If cell contains "text"

  • Thread starter Thread starter Batfastad
  • Start date Start date
B

Batfastad

Hi guys, I know this is possible but I can't remember how I did it...
I'm using Excel 97.

I have a column of data A.

I have a column next to it B which I want to have the value equal to
"YES" if the cell in A contains certain text but otherwise remains
blank.
I'm looking for something like =If(A1="AMD DIRECTORY","YES","")

But of course that only works if A1 has only the words AMD DIRECTORY in
it.
Unfortunately that cell has many different words throughout.

Anyone have any ideas?

I know this is possible because I have done this in the past but can't
find my original files.

Thanks

Batfastad
 
Bat,

=IF(ISTEXT(A1),"YES","")

is one possibility, if you will accept ANY text, but otherwise, you could
use a named range "GoodValues" that has all the possible values:

=IF(SUMPRODUCT((A1=GoodValues)*1)>0,"Yes","")

HTH,
Bernie
MS Excel MVP
 
=IF(COUNTIF(A1,"*AMD DIRECTORY*"),"Yes","")

or

=IF(ISNUMBER(FIND("AMD DIRECTORY",A1)),"Yes","")

the latter case sensitive

you might want to replace the criteria with a cell where you type it if it
is more than one
criteria

=IF(ISNUMBER(FIND(C1,A1)),"Yes","")

where C1 holds the criteria
 
Excellent, CountIf is the one!

Thanks!!

I knew there was a function which does it!

Thanks again!!
 
SOLVED...

Thanks guys but I wasn't trying to check if it was formatted as text.
I've found the answer using the CountIf function

Thanks again

Batfastad
 
Back
Top