I would like to be able to use OR in substitute, to say remove red or blue or green if it appears in cell.
A1
red tiger
B1
green turtle
C1
blue fish
=SUBSTITUTE(A1,("red "or"blue "or"green "),"")
I would like to be able to use OR in substitute, to say remove red or blue or green if it appears in cell.
A1
red tiger
B1
green turtle
C1
blue fish
=SUBSTITUTE(A1,("red "or"blue "or"green "),"")
Last edited by seanjacob; 09-23-2010 at 05:55 AM.
Try this in D1
Drag across to F1![]()
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"red",""),"green",""),"blue","")
Hope this helps
If you need any more information, please feel free to ask.
However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....
Also
اس کی مدد کرتا ہے اگر
شکریہ کہنے کے لئے سٹار کلک کریں
If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.
Thank you very much Marcol,
Shame that it couldn't be more simple.
I'm not a formula whizz-kid, perhaps it can be simplified?
In the meantime you might also want to try
Note the space after the colour.![]()
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"red ",""),"green ",""),"blue ","")
or
these examples will remove leading spaces as in your sample data.![]()
=TRIM(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"red",""),"green",""),"blue",""))
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks