The strings in column A can be composed of both numbers and characters; however, the numbers may only appear at the beginning of the string and the characters at the end.
We want to separate the strings into two columns, one containing only numbers and the other containing characters.
Solution:
Use the LEFT, MAX, IF, ISNUMBER, MID, INDIRECT, and ROW functions as shown in the following Array formula entered in column B:
{=LEFT(A2,MAX(IF(ISNUMBER(--MID(A2,ROW(INDIRECT("1:1024")),1)),ROW(INDIRECT("1:1024")))))}
Then use the SUBSTITUTE function as shown in the following formula entered in column C:
=SUBSTITUTE(A2,B2,"")
To apply Array formula:
Select the cell, press and simultaneously press .
Hello, Is there any extra explanation about what this formule is doing? What do that double dashes mean? Why it has to be entered as an array?
Is it possible it doesn't work under office 2003 (11.6355.6360) SP1 or 97?
I mean, I'm just curious, I tried with some test values on A2 and at first sight it doesn't work, it just return only the first numeric character in A1 as if we were saying left(A2,1).... so I evaluated all the rest of the formula (from MAX till the end) and it does give the right value for the amount of numbers in the string.... but only when is evaluated with F9, not as a result... even if I paste from MAX till the end on another empty cell, it evaluates good but shows wrong results when entered... so I presume is bug mi office has...
Does not work in case cell with decimles
VAIBHAV wrote on December 31, 1969 19:00 EST
It does not work in case cell with decimles. Is there ant formuale to resolve this issue?????
Seperate row functions
Michael wrote on December 31, 1969 19:00 EST
I cannot get my excel 2007 report to stop adding all of the rows into individual row functions. How do I get it to stop?!?
Terms
and Conditions of use
The applications/code on this site are distributed as is and without warranties
or liability. In no event shall the owner of the copyrights, or the authors
of the applications/code be liable for any loss of profit, any problems
or any damage resulting from the use or evaluation of the applications/code.