cansevin
asked on
Pull out address field
I have a column of cells (B) with addresses in this format:
3636 Bravata Dr
Huntington Beach, CA 92649
Everytime the street is followed by a "Enter" before the city.
In column C I need to pull out just the street address (the top line). Any idea the formula for this?
3636 Bravata Dr
Huntington Beach, CA 92649
Everytime the street is followed by a "Enter" before the city.
In column C I need to pull out just the street address (the top line). Any idea the formula for this?
That will work, or you can do it in a single formula by using
WebDevEM
=RIGHT(B1,LEN(B1)-FIND(CHAR(10),B1))
in Column C. It looks for the position of Char(10) and takes everything to the right of it as the new value in Column C.WebDevEM
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks! Worked!
In 1st step you will substitute Enter (new line) character to another and in 2nd step you will separate what was on the first line in original cell.
Assume you have your address in A1 cell, then in B1 use this formula =SUBSTITUTE(A1;CHAR(10);";
In step 2, select B1, do Text to columns (divider will be ";" sign) and you will have what you need in C1 (the text following ";" will be in D1 and you can delete it if you do not need it
also you can see it in my sample
sample.xlsx