Varying LEFT Function

John_Wh

Board Regular
In column A I have varying input data that I need to adjust. I'm trying to eliminate the parentheses and the 1 or 2 digit numbers within.

Column A I've got data like

15 C.Smith(5)
9 F.Forsberg(12)

etc. the number in the parentheses increases as the season progresses.

In column B I'm wanting the result to be

15 C.Smith
9 F.Forsberg

I'm using this function but have to alter it as the number in parentheses increases.

=LEFT(A1, LEN(A1)-3) which works well with one digit in the parenthesis but have to manually change the formula to =LEFT(A1, LEN(A1)-4) when 2 digits are in the parenthesis.

What is one formula that covers both conditions (1 or 2 digits in the parenthesis) I do not expect to ever have 3 digits in the parenthesis.

Thanks

RoryA

MrExcel MVP, Moderator
Try:

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

gaz_chops

Well-known Member
Try

=REPLACE(A1,FIND("(",A1),99,"")

John_Wh

Board Regular
Thanks guys

Both work fine.

Fluff has responded a few times regarding this hockey spreadsheet and just a few minutes ago regarding something else on it.

Wish I could buy all the mods a beverage of their choice. Hope you get the satisfaction of helping as much as those you help!

RoryA

MrExcel MVP, Moderator
Hope you get the satisfaction of helping as much as those you help!
That's one of the reasons we're here!