Index/Match with multiple lookup arrays

Joined
Sep 2, 2021
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Hello,
I am attempting to create a formula to return the first value in column G that is not in column A & D. Using the formula below, I was able to get the correct result using only one lookup column.

=INDEX($G$1:$G$9,MATCH(TRUE,INDEX(ISNA(MATCH($G$1:$G$9,$A$1:$A5,0)),0),0)) - returns 3 (which is correct)

Ultimately, I want the formula to lookup matches in both columns A & D. For the example below, this should result in the formula returning 8. I have tried various methods of MATCH with multiple lookup arrays, however none of them are returning the correct result.

Thanks,

ABCDEFGHI
11V3P1
22W4Q2
35X1R3
46Y2S4
57Z5T5
66U6
77
88
99
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi & welcome to MrExcel.
How about
Excel Formula:
=AGGREGATE(15,6,G1:G9/(ISNA(MATCH(G1:G9,A1:A5,0)))/(ISNA(MATCH(G1:G9,D1:D6,0))),1)
 
Upvote 0
Hi & welcome to MrExcel.
How about
Excel Formula:
=AGGREGATE(15,6,G1:G9/(ISNA(MATCH(G1:G9,A1:A5,0)))/(ISNA(MATCH(G1:G9,D1:D6,0))),1)
Thanks for this solution! This mostly does what I'm looking for, however there are instances in Column G (beyond what's shown in my example) where numbers are not in sequence. For example, if cell G8 contained 84 rather than 8, the formula should return 84, rather than 9 (as it currently does). The formula I gave in my example was able to do this for one column, however because of the Small condition within the Aggregate function, it seems to be ignoring these. Is there a way to change the formula to return the values in the sequence they appear?
 
Upvote 0
Yup like this
Excel Formula:
=INDEX(G1:G9,AGGREGATE(15,6,(ROW(G1:G9)-ROW(G1)+1)/(ISNA(MATCH(G1:G9,A1:A5,0)))/(ISNA(MATCH(G1:G9,D1:D6,0))),1))
 
Upvote 0
Solution

Forum statistics

Threads
1,214,983
Messages
6,122,595
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top