Varying LEFT Function

John_Whin

Board Regular
Joined
Feb 26, 2013
Messages
78
Platform
  1. Windows
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
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Try:

=LEFT(A1,FIND("(",A1&"(")-1)
 
Upvote 0
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!
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,155
Members
453,021
Latest member
Justyna P

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