• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Validate for one of multiple criteria in a row

gwstudent

New Member
This seems so simple yet my formula isn't working - so I must be going about this the wrong way.

I have a row of data from column B to column Z:
A, B, C, D, E, F, G, H...

If the row contains an "A" or an "H" (or any other value) I would like to simply show a "1" in the current cell - A1. My formula below seems fairly straightforward but I get #N/A. Any help would be appreciated


=IF((OR(MATCH("A",$B1:$Z1,0),MATCH("H",$A1:$Z1,0))),1,"")
 
Last edited:
Formula is made for A & H only. Change as required

Code:
=IF(OR(COUNTIF($B1:$Z1,"A")>0,COUNTIF($B1:$Z1,"H")>0),1,"")
 
Xiq - that worked too. Two totally different solutions but with the same result. I never would have thought to use either approach. Thank you for your input.
 
Back
Top