Truncate all text after (

fgd

New Member
Joined
Mar 3, 2004
Messages
49
I have a list of job titles and SOME of them have notes in parentheses, like this: Director (Part Time).

I want to write a query that produces the titles without the notes. In other words, all text after the ( would NOT appear. Titles without the ( would display the entire title.

I tried but to no avail.

Help?

Thanks
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,304
Office Version
  1. 365
Platform
  1. Windows
Try this.

OnlyTitle: Trim(Left([Title],InStr([Title],"(")-1))
 

giacomo

Well-known Member
Joined
Feb 20, 2002
Messages
1,796
IIf(InStr([job_title],"(")=0,[job_title],Left([job_title],InStr([job_title],"(")-2))

hth,
Giacomo
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,304
Office Version
  1. 365
Platform
  1. Windows
fgd

Stick with Giacomo's expression, mine doesn't check for the non-existence of the (, so will probably cause errors.:eek:
 

Forum statistics

Threads
1,141,666
Messages
5,707,715
Members
421,525
Latest member
carian1980

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
Top