View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Vasant Nanavati Vasant Nanavati is offline
external usenet poster
 
Posts: 1,080
Default test cell for text string; return value if condition is true

=IF(NOT(ISERROR(FIND("PIT",A1))),"PIT","")

etc.

FIND is case-sensitive. For case-insensitivity, use SEARCH.

--

Vasant


"Steve" wrote in message
...

Am stuck on something...

A B C
D

Pit/Slave data data RETURN VALUE HERE
New Pit Req data data RETURN VALUE HERE
No Action Req data data RETURN VALUE HERE
Pits are broken

I would like example code to check cell A1 for the text string of
"PIT" (ie it might be "pits" or "OldPits" or just "pit")

I need to return text string "PIT" to cell A4 if the condition is
true.

I have a few other text strings I need to check in A1 also; "Slave"
will return "Slave" to A4, "gaurd" will return "gaurd" to A4 etc...

Need to loop through A1:A8900

Any help appreciated


Steve