Ryan Snead
Ryan Snead

Reputation: 25

if the comparison of two columns is true, then compare their corresponding value in the next two columns and report true/false

Can't seem to get this one. I am comparing in excel if 2 columns (A and H) have any matching document #'s with

=NOT(ISNA(VLOOKUP(H3,$A:$A,1,FALSE)))

If this returns TRUE, I want to compare the revision # corresponding to each document # and return TRUE or FALSE as well. I have the first VLOOKUP working correctly but now I'm unsure how to use a nested if and be sure it is extracting the corresponding revision #. Your assistance is very much appreciated.

*So basically it is an If true, then if true....

*Comparing column A with column H. if there is a matching document #, I want to compare their corresponding revisions (revisions for column A are in column B and revisions for column H are in column E) and see if those ALSO match.]1 THANK YOU for your swift responses!!!

*sorry I need 2 more reputations to add an image apparently...

*excel file image description just above!

Upvotes: 1

Views: 1682

Answers (3)

barry houdini
barry houdini

Reputation: 46371

Perhaps COUNTIFS will give you your answer

=COUNTIFS(A:A,H3,B:B,E3)>0

That will give you TRUE only if document H3 is found in column A...and on that same row the revision # in column B is the same as E3

Upvotes: 2

user1274820
user1274820

Reputation: 8144

I'm not sure exactly what the columns you're working with are like but this is how you would add the nested if:

=IF(NOT(ISNA(VLOOKUP(H3,$A:$A,1,FALSE))),[True Code],[False Code])

If you can provide a better idea of the column layouts (like a picture?) I can elaborate.

Comparing column A with column H (just off screen). If there is a matching document #, I want to compare their corresponding revisions (revisions for column A are in column B and revisions for column H are in column E) and see if those ALSO match.

[Image]

Upvotes: 2

CallumDA
CallumDA

Reputation: 12113

I'm interested to get more info from OP, but for now this might be a better way to avoid using the combo of NOT, ISNA and VLOOKUP all together:

=IF(SUMPRODUCT(--($A:$A=H3)),[True Code],[False Code])

Upvotes: 3

Related Questions