Link to home
Start Free TrialLog in
Avatar of cansevin
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?
Avatar of helpfinder
helpfinder
Flag of Slovakia image

you can do it this way, but 2 steps are required.
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
That will work, or you can do it in a single formula by using
=RIGHT(B1,LEN(B1)-FIND(CHAR(10),B1))

Open in new window

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
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cansevin
cansevin

ASKER

Thanks! Worked!