Forum Discussion
xen900
Jul 15, 2022Copper Contributor
Excel - Need to split variable length names and dates
My issue is that I need to split names and dates that are all in the same column, but names are not always First / Last with a date. I need to be able to incorporate the solution into a macro. I am n...
- Jul 15, 2022
Let's say the values are in A2 and down.
In B2:
=TRIM(LEFT(SUBSTITUTE(A2," ",REPT(" ",255),LEN(A2)-LEN(SUBSTITUTE(A2," ",""))-4),255))
In C2:
=TRIM(MID(SUBSTITUTE(A2," ",REPT(" ",255),LEN(A2)-LEN(SUBSTITUTE(A2," ",""))-4),255,255))
Fill down.
HansVogelaar
Jul 15, 2022MVP
Let's say the values are in A2 and down.
In B2:
=TRIM(LEFT(SUBSTITUTE(A2," ",REPT(" ",255),LEN(A2)-LEN(SUBSTITUTE(A2," ",""))-4),255))
In C2:
=TRIM(MID(SUBSTITUTE(A2," ",REPT(" ",255),LEN(A2)-LEN(SUBSTITUTE(A2," ",""))-4),255,255))
Fill down.
xen900
Jul 15, 2022Copper Contributor
You are AMAZING. Thank you. This is perfect!