Extracting text after symbol in excel

LauraForiero

New Member
Joined
Oct 6, 2013
Messages
18
HI
Probably simple I just cant figure it out.

I have cell content of a variable length string and I need to extract all text after "!" or "$"

A
Brouillet,Amy Anne!Miss
Dupuis,Jean Paul$Monsieur
Ethier,Guy!Mr
Fu,Guo Qing$Prince
Gowan,Louise Marie$Mademoiselle
McGill,James Patrick!Dr
Robinson,Jacques$Monsieur
Vinet,Jean Pierre!Mr
Voigt,Claire Antoinette$Madame
Wong,Jia$Reverend

<colgroup><col style="width: 159pt; mso-width-source: userset; mso-width-alt: 7753;" width="212"> <tbody>
</tbody>

I know i must use the Right and Find function together but don't know how to. I need 1 single expression for the entire column.
thanks in advance
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Try

=IF(ISNUMBER(FIND("!",A1)),RIGHT(A1,LEN(A1)-FIND("!",A1)),RIGHT(A1,LEN(A1)-FIND("$",A1)))
 
Upvote 0
LauraForiero,

WElcome to the forum.

One way.......


Excel 2007
AB
1Brouillet,Amy Anne!MissMiss
2Dupuis,Jean Paul$MonsieurMonsieur
3Ethier,Guy!MrMr
4Fu,Guo Qing$PrincePrince
5Gowan,Louise Marie$MademoiselleMademoiselle
6McGill,James Patrick!DrDr
7Robinson,Jacques$MonsieurMonsieur
8Vinet,Jean Pierre!MrMr
9Voigt,Claire Antoinette$MadameMadame
10Wong,Jia$ReverendReverend
Sheet5
Cell Formulas
RangeFormula
B1=IFERROR(RIGHT(A1,LEN(A1)-FIND("!",A1,1)),IFERROR(RIGHT(A1,LEN(A1)-FIND("$",A1,1)),""))


Copy formula down as required.

Hope that helps.
 
Upvote 0
Another formula you can try...

=TRIM(RIGHT(SUBSTITUTE(SUBSTITUTE(A1,"!","$"),"$",REPT(" ",99)),99))
 
Upvote 0
Second quesitons

I have cell content of a variable length string and I need to extract all text between "!" or "$" and the ","

A
Brouillet,Amy Anne!Miss
Dupuis,Jean Paul$Monsieur
Ethier,Guy!Mr
Fu,Guo Qing$Prince
Gowan,Louise Marie$Mademoiselle
McGill,James Patrick!Dr
Robinson,Jacques$Monsieur
Vinet,Jean Pierre!Mr
Voigt,Claire Antoinette$Madame
Wong,Jia$Reverend


<tbody>
</tbody>

Again, i need one expression for the entire column
 
Upvote 0
worked like a charm. thank you so much
Not sure who you were responding to (you had four different formulas offered to you), but here is one more that only uses a total of 3 function calls...

=MID(A1,FIND("$",SUBSTITUTE(A1,"!","$")&"$")+1,99)

And you can copy it down past the end of your current data in anticipation of future data entries later on.
 
Upvote 0
How do i extract anything between "!" or "$" and the ","

Brouillet,Amy Anne!Miss

for example, i would like to extract the "Amy Anne" here
 
Upvote 0
Try this formula:

Code:
=MID(A2,FIND(",",A2,1)+1,(FIND("!",SUBSTITUTE(A2,"$","!"),1)-FIND(",",A2,1))-1)
 
Upvote 0

Forum statistics

Threads
1,214,795
Messages
6,121,624
Members
449,041
Latest member
Postman24

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