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

On Wed, 22 Mar 2006 17:21:52 +0800, "0-0 Wai Wai ^-^" wrote:

If the cell contains..., do something

Hi.

1)
How to do the following:
a) If the cell starts with "senior", do something... (eg count that cell if the
cell starts with "senior")


=LEFT(A1,7) = "senior "

=IF(LEFT(A1,7) = "senior ","Do Something","Do Nothing")

b) If the cell has "March" in the middle, do something...


=ISNUMBER(FIND(" March ",A1)) for conditional formatting.

(note the space before and after March in the FIND function).

=IF(ISNUMBER(FIND(" March ",A1)),"do something","DO NOTHING")

c) If the cell ends with "boy", do something...
d) If the cell contains the word (it doesn't matter where the word locates), do
something...
??

2) Can you answers in Q1 be used in "conditional formatting"?
I need these conditons to format my cells too!
Thank you!


--ron