Copy info before parenthesis or omit info after

daniels012

Well-known Member
Joined
Jan 13, 2005
Messages
5,219
In Column A, I have data such as:
Michael Tollison (SF-RB) 26 25 25%
All I want in column B is the name to the left of the parenthesis.
Everything in column a always is set this way, so the name is
first.

What can I write for a formula to extract this name easily?

Michael
 
Dear Mr. Michael

Try this

Your question : Michael Tollison SF-RB 26 25 25% (if cell ref. in A1)
Answer : =LEFT(a1,(FIND("-",a1)-1))

Let me know if it works.

tks n rgds

Shyam
 
Upvote 0
If there is always two balnk spaces before the two letter code then try:
Code:
=LEFT(A1,FIND("  ",A1)-1)
Note that there are 2 blanks between the " "
 
Upvote 0
Dear Mr. Peter,

Your answer for Mr. Michael was as follows:

If there is always two balnk spaces before the two letter code then try:

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

Note that there are 2 blanks between the " "
========================================

But I tried in my case, it is giving #value error ?
If i give one space between " " in the above formula, it gives the answer as Michael. But if I give two blanks as suggested by you, then it gives the error as #value.

could you please explain ?

Tks n rgds

Shyam
 
Upvote 0
shyam

As I understand it, Michael's DATA also has two spaces in it. The two spaces are after the persons name. It is not easy to show two spaces together on this board, so I will use the '.' to represent spaces. Michael's data was like this:
Michael.Tollison..SF-RB.26.25.25%
Note the two spaces after Tollison.

If you put two spaces in your data, I think you will find that my formula works. It is giving the #value error at the moment because it cannot find two spaces in your data.
 
Upvote 0
Dear Mr. Peter,

I got your point. It's is working ok.
What I understand from Mr. Michael question is that he wants the name + 2 characters. i.e. Michael Tollission SF to be picked up from the list. I feel that the formula given by you needs to be modified a little.

rgds
shyam
 
Upvote 0
What I understand from Mr. Michael question is that he wants the name + 2 characters. i.e. Michael Tollission SF to be picked up from the list. I feel that the formula given by you needs to be modified a little.
I don't think so, his very first post said:
All I want in column B is the name to the left of the parenthesis.
Everything in column a always is set this way, so the name is
first.

What can I write for a formula to extract this name easily?
and after I provided my last solution, his response was:
Thank You sooo Much Peter SSs
Given those two quotes, and the fact that he has not posted back asking for further help, indicates to me that the solution is what he wanted. If not I am sure he will post back again.
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top