Link to home
Start Free TrialLog in
Avatar of Bright01
Bright01Flag for United States of America

asked on

Simple Parcing of Data

EE Pros,

I have Email addresses that are NAME/Location/Location/Location formatted in a single cell.

I need to have a macro or formula that extracts and leaves only THE NAME.   So, in other words, when it reads the cell, and sees the first "/", it will delete the "/" and everything after that in the same cell.

Thank you in advance.

B.
Avatar of Missus Miss_Sellaneus
Missus Miss_Sellaneus
Flag of United States of America image

=LEFT(A2,FIND("/",A2)-1)

EDIT: Oh, that won't do it in the same cell.
SOLUTION
Avatar of Rob Henson
Rob Henson
Flag of United Kingdom of Great Britain and Northern Ireland 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
ASKER CERTIFIED SOLUTION
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
As Missus points out in her first comment, a formula will not do it in the same cell.  To do it in the cell will have to be Text to Column as I suggested or with a macro.
Avatar of Bright01

ASKER

Great job!  Fast and both worked.   Thank you for the help.
If you're going to accept JimJam's formula, you ought to have given points to Missus as well.

Any reason why you accepted formula as best when you specified you wanted in same cell?
Jimjam's formula allowed me to copy and paste it down a complete column and it worked.  I also had 3 "/" in the same cell and everything right of the first "/" was deleted leaving me with exactly what I needed.

B.
And so would LEFT function
Rob,

Just tested her code and you were right!  It worked also.  I owe Miss Sellaneus  some points and an apology........  I'm afraid I dismissed her answer when she mentioned it didn't work within the same cell.

Thanks for calling this out.

B.
That is what the LEFT function is designed to do -  show everything to the left of a given point, in Missus formula that given point was the first occurrence of "/".
leaving me with exactly what I needed.
this might be the case but it isn't what you asked for.

Missus in some ways rightly pulled her answer because you asked for
everything after that in the same cell
.
Well, as in life, sometimes we adapt to the situation.  I could have actually gone either way.... in the same cell or as a result of the cell containing the original data.  My fault for not looking harder at her answer.   I'll need to be more careful on these responses.

Again, thanks for pointing out the fact that her code worked with only a minor change to the original "ask".

B.
No worries, just ensuring an answer which is as full as possible for people searching for answers in future.