2

I have an Excel column where each cell contains the contents of an address. What I'd like to do is split THE FIRST TWO words into a their own separate columns.

For example: 123 South Bend Rd, Make Belive

Would output: 123 in one cell, South in another.

migrated from stackoverflow.com May 23 '11 at 20:24

This question came from our site for professional and enthusiast programmers.

5

Assuming data is in column A, use formula in B1 (and copy down for all data rows)

=LEFT(A1,FIND(" ",A1)-1)

and in cell C1

=MID(A1,LEN(B1)+2,FIND(" ",A1,LEN(B1)+2)-LEN(B1)-2)
  • 3
    In your first formula it might be worth using =TRIM() just to make sure no leading white spaces otherwise it may find a " " at start of string. – Anonymous May 19 '11 at 6:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy