在Excel中如何找到具有不同字符的Mid Value [英] In Excel how to find Mid Value with different character
问题描述
例如
12-1234567-43-45我想1234567
12-1276556387-35-34我想要1276556387
请帮我解决如何从不同的char获取中间值。
For Example
12-1234567-43-45 i want 1234567
12-1276556387-35-34 i want 1276556387
Please help for me how to get mid value from different char.,
推荐答案
假设值是在单元格A1中,前导和尾随子串具有固定长度,请尝试以下公式:
Assuming the value is in cell A1 and the leading and trailing substrings are of fixed length, try this formula:
=MID(TRIM(A1),4, LEN(TRIM(A1))-9)
参考: http:// www .excel-easy.com / functions / text-functions.html [ ^ ]
+++++ [第2轮] +++++
Reference: http://www.excel-easy.com/functions/text-functions.html[^]
+++++[Round 2]+++++
=LEFT(TRIM(MID(TRIM(A1),FIND("-",A1)+1,LEN(TRIM(A1)))),FIND("-",MID(TRIM(A1),FIND("-",A1)+1,LEN(TRIM(A1))))-1)
参考: http://www.techrepublic.com/article/using-excels-find-and-mid-to-extract-a-substring-when-you-dont-know-the-start-point/ [< a href =http://www.techrepublic.com/article/using-excels-find-and-mid-to-extract-a-substring-when-you-dont-know-the-start-point/目标=_ blanktitle =新窗口> ^ ]
这篇关于在Excel中如何找到具有不同字符的Mid Value的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!