Trim & Right Functions

  • Thread starter Thread starter Dominique Feteau
  • Start date Start date
D

Dominique Feteau

I have this formula which will look for the "," in F31 and display
everything to the right of it:

=TRIM(RIGHT(F31,LEN(F31)-FIND(",",F31)))

Can this formula be tweaked to look for a "#" or a text string using "OR"
statements?

let me know
niq
 
niq:

It can get ugly quick. For example:

=IF(ISERROR(FIND(",",F31)),IF(ISERROR(FIND
("#",F31)),F31,TRIM(RIGHT(F31,LEN(F31)-FIND
("#",F31)))),TRIM(RIGHT(F31,LEN(F31)-FIND(",",F31))))

will test in precedence for comma, pound, and if none will
leave it alone.

Excel Support Technician
www.canhelpyou.com
-----------------------------------------------------------
 
Thanks Kent but I found an easier way to do what I needed. I used Tools ->
Text to Columns and it did exactly what I needed. I had to tweak it a
little, but it worked perfectly in the end.

Thanks for your help

Niq
 
Funny ... I went that route to and then decided the "_"
words would be all over the place. I should have asked
about your data pattern ;^)
 
Back
Top