Question:

How do you Vlookup 2nd table if match not found in 1st table?

by Guest56155  |  earlier

0 LIKES UnLike

I have two tables that pull data from a query. I want to be able to vlookup or sumif a 2nd table if it does not find the match in the first table. If anyone can help, I would appreciate it.

Microsoft Excel

 Tags:

   Report

1 ANSWERS


  1. Say your 1st table range is A1:B10, 2nd table range is D1:E10, lookup value is in C1, lookup column is the 2nd column for both table, here's the formula

    =IF(ISNA( VLOOKUP(C1, A1:B10, 2, false)), VLOOKUP(C1, D1:E10, 2, false), VLOOKUP(C1, A1:B10, 2, false))  

    In case of VLOOKUP 1st table, if failed to return value, then SUMIF 2nd table E column values if corresponding D column values are "A", use this formula

    =IF(ISNA( VLOOKUP(C1, A1:B10, 2, false)), SUMIF(D1:D10, "A", E1:E10), VLOOKUP(C1, A1:B10, 2, false))  

    Hope this helps.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.