stuck on removing specific text

kurigami

New Member
Joined
Aug 18, 2016
Messages
15
Hi everyone.

I'm trying to remove a specific character ")" however, I need it to fit within my existing formula if at all possible. The formula already identifies "(" and removes the character plus everything left of it. I know that the substitute function is probably best here (either that or RIGHT, but the last character isn't always a ")" so I don't think I want to go that route), but I can't quite figure out where to fit it in. Here's what I have currently:

=IF(A2="","",IFERROR(RIGHT(B2,LEN(B2)-FIND("(",B2)),IFERROR(VLOOKUP(A2,'Org Chart'!$E$2:$F$526,2,FALSE),"Rep not found in snapshot")))

Thanks for your help!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
If I understand this, if there's something in B2 and it has parentheses in it, you want to just show the part in the parentheses? And if there are no parentheses in B2, you use VLOOKUP to find something else? Will there ever be more than one set of parentheses?
 
Upvote 0
You can replace this part of your formula:

RIGHT(B2,LEN(B2)-FIND("(",B2))

with:

RIGHT(LEFT(B2,FIND(")",B2)-1),FIND("(",B2)+1)
 
Upvote 0

Forum statistics

Threads
1,215,477
Messages
6,125,036
Members
449,205
Latest member
Eggy66

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