Excel First word Last word Nth word
Here’s an easy way to get the first word of a string
=LEFT(A1, SEARCH(” “, A1)-1)
Here’s an easy way to get the last word of a string
=TRIM(RIGHT(SUBSTITUTE(A1,” “,REPT(” “,100)),100))
And here’s an easy way to get the nth word of a string
=TRIM(MID(SUBSTITUTE(A1,” “,REPT(” “,100)), (nth-1)*100+1, 100))
No more macros, yeah!
Advertisement
Categories: Uncategorized