View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave F Dave F is offline
external usenet poster
 
Posts: 2,574
Default Formula for searching for a text string

Try something like this:

=IF(ISBLANK(A1),0,IF(TRUE(FIND("GEN",A1)),0,1))

Dave


--
Brevity is the soul of wit.


"KellyB" wrote:

I have a table where each cell contains a string of various alphanumeric
codes. For example:
KB / S596-19
RM / S243-59
VB / I1997-1
KB / GEN
SV / GEN

I want to write a formula to count 1 if the cell is populated (not all cells
are), but count 0 if the cell contains 'GEN'.
I've tried this:
=IF(AND(B4<"",B4<"*GEN*"),1,0)

But the "*GEN*" portion of this formula does not work.

Any suggestions?

KellyB