Or's with If's Statements

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to write an if statement for a range of cells, so that if any one
of the 6 cells has a certain word in them, my destination cell (where my
formula is written), will give my staff members a certain command. Is there
a way to do this with an 'if' statement, or does anyone have other
suggestions?

Any help you can give me would be much appreciated. Thank you in advance.
Shelli - Senior Accountant
 
Sr Accountant,
This is what I came up with:
Cells A11 thru F11 blank,
In cell G11
"=IF(ISTEXT(A11)=TRUE,1,IF(ISTEXT(B11)=TRUE,2,IF(ISTEXT(C11)=TRUE,3,IF(ISTEXT(D11)=TRUE,4,IF(ISTEXT(E11)=TRUE,5,IF(ISTEXT(F11)=TRUE,6,0))))))"
This looks at each cell one at a time, if there is text in it, it outputs a
corresponding number. To change the command, depending on the response. Just
change the number to the command.
hth
 
If the certain word exist in the cell, will it be the only word in the
cell...or might there be other words along with it? If the text string you
are searching for will not contain any other text along with it, then:

=IF(COUNTIF(A1:A6,"CertainWord")>0,"Word exists.","Word does NOT exist.")

HTH,
Paul
 
=IF(COUNTIF(A1:A6,"CertainWord")>0,"Word exists.","Word does NOT exist.")

You can leave the >0 out and it will still work, right?

Rick
 
This is true. It's jkind of a habit of mine to include the operator in
there, even when it's only necessary to check true or false. Thanks for
pointing that out.
 
There will be three options, "Cash Post", "Do Not Cash Post" or Blank.
Nothing else should appear in the cells. I will give your ideas a try.

Thank you,
Shelli
 
Back
Top