IF stmnt with a nested AND statement - need help

E

elisabronte

Using Excel, I have 3 conditions, lets say a1 is apple, a2 is apple,
a3 is pear.

In C1 - I do a simple if...comparing if a1=a2, "match", else "error"

so then I go to D1 - and i want to focus on the error columns -
catching any instances where the record above may say match in column
C but also that the info in column a matches as well.

This is what i have come up with so far but I am getting a "this
formula has an error" message.
formula for column D ...
=if(d1="match", "match", If(D2="error" and D1="match" and a1=a2,
"match", "error")),

I am comparing cell above to cell below - if match say match.
Then I look at the cell below and if it already says match - leave
alone.... but if it says error - go look at the cell above to see if
the contents in top row top column match the second row top column- if
these match, then say match.... otherwise say error.

Unfortunately the person I am doing this for only has excel and not
access.

Anyone help out here?
 
F

Fred Smith

To use more than one condition in an If statement, use the And function, as in:

=if(and(d2="error",d1="match",a1=a2),true,false)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top