I mean for example in A1: 123b maybe the best put 123 to B and "b" for C column. Any function for that?
If the numbers are always at the beginning, then, for the numbers:
=LOOKUP(9.9E+307,--LEFT(A1,ROW(INDIRECT("1:20"))),LEFT(A1,ROW(INDIRECT("1:20"))))
and for the letters:
=MID(A1,LEN(LOOKUP(9.9E+307,--LEFT(A1,ROW(INDIRECT("1:20"))),LEFT(A1,ROW(INDIRECT("1:20")))))+1,20)
The "20"'s in the formulas just needs to be some number that is larger than the length of the longest string you might be processing.
If you just want to get the number part of the value (assumed to be in A1), use the array formula (control-shift-enter after entering the formula):
=VALUE(LEFT(A1,MIN(IFERROR(SEARCH({"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"},A1),LEN(A1)))-1))
The formula does the following:
To get the text part:
=RIGHT(A1,LEN(A1)+1-MIN(IFERROR(SEARCH({"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"},A1),LEN(A1))))
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.