View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Clivey_UK
 
Posts: n/a
Default If the cell contains..., do something


Try this to find March when not at start, not at end, but appears in
text:
=IF(ISERR(IF(SEARCH("March",A1,2)1,1,"")),"",IF(R IGHT(A1,5)<"March","Yes",""))
Clive

0-0 Wai Wai ^-^ Wrote:
"Clivey_UK"
¦b¶l¥ó
¤¤¼¶¼g...

I'm not sure how you could do this with conditional formatting, which

is
what you need for the last part of your question.
However, you also need to say do a count, so try the following for
point 1)
a) =IF(LEFT(A1,6)="senior","Yes","")
b) =IF(ISERR(IF(SEARCH("March",A1,1)0,1,"")),"","Yes ")
c) =IF(RIGHT(A1,3)="boy","Yes","")
d) As b) which just finds the word March anywhere in the text.
Hope this helps.
Clive


As to (b), my intention is to find word which happens in the middle
only! Eg:
- March 30
- 30 March
- 2 March., 2000

The first one: Wrong! The word is at the start!
The second one: Wrong! The word is at the end!
Only the last one is true.

Any way to do so?
Thank you!



--
Clivey_UK
------------------------------------------------------------------------
Clivey_UK's Profile: http://www.excelforum.com/member.php...o&userid=32569
View this thread: http://www.excelforum.com/showthread...hreadid=525176