Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove bracketed data inc the brackets

Status
Not open for further replies.

mart10

MIS
Nov 2, 2007
394
GB
I have a field containg random length names but with an abrebviation at the end in brackets. I want to just show the name

eg xxxxx (yy xx bb) show xxxx

xxxxx XXXXXXX YYY (aa bb) show xxxxx XXXXXXX YYY


I tried this for instance :

replace ({Divisions.LongName},"(Head Office UK)","")

BUT the problem is the abreviation can be anything and any length so I need the formula to be something generic to replace whatever is in the brackets with nothing , plus the brackets of course :>)
 
Left({table.field}, instr({table.field},”(“)-2)

-LB
 
PS. If you copy the formula into CR, retype the quotes, since my iPad is returning quotes that aren't recognized by CR.

-LB
 
sorry this doesnt work at all. I just get an error msg when trying to save it
 
Also, I did test this, and it worked perfectly here, so please post the exact formula that you used.

-LB
 

filed formula -->
left({Divisions.LongName}, instr({Divisions.LongName},”(“)-2)

error msg -->

A number, currency amount, boolean, date, date-time or string is expected here
 
LB did say retype in Crystal formula. The double quotes look wrong.

,”(“)

Should be more like

,"(")

Ian
 
Thanks Ian

It works now, thanks

I did see his comment but the font on here is so small I could not see an issue, when I pasted into word and expanded the font I could see the VERY subtle difference
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top