Create a list using Index Aggregate with criteria from 2 separate columns.

Silverhorne

New Member
Joined
Feb 21, 2015
Messages
42
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hello,
I've been searching to see if there is a way to achieve the list in column G when data is added to the the cells of column D.
Can the criteria be set to C2:C10 & E2:E10 instead of C2:E10?
I created a formula to populate the correct ID to the item number, any suggestions for a better method?
Thanks for any help in advance!

ITEMID 1DATAID 2
111-MS-1-24-2LHD16111-MS-1-24-2LH
111-MS-1-24-3K3111-MS-1-24-2D16
111-MS-1-24-4LHP2111-MS-1-24-3K3
111-MS-1-24-5RC111-MS-1-24-4LH
111-MS-1-24-6LHRC111-MS-1-24-4P2
111-MS-1-24-5RC
111-MS-1-24-6LH
111-MS-1-24-6RC


"G2"=IFERROR(@INDEX(B$2:B$10,AGGREGATE(15,6,(ROW($B$2:$B$10)-ROW($B$2)+1)/($C$2:$E$10>0),ROWS($A$1:$A1))),"")
"H2"=IFERROR(IF(G2=G1,INDEX($B$2:$E$10,MATCH(G2,$B$2:$B$10,0),4),INDEX($B$2:$E$10,MATCH(G2,$B$2:$B$10,0),2)),"")
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Sorry, not sure why XL2BB isn't posting the headers and formulas, it was working for my last post. Mini sheet crashes my excel??
The items column is actually column B.
 
Upvote 0
Copied to a new workbook and it didn't crash, started a new tab in the original workbook and it had a lot of array formulas that it must not have liked.


Book1
ABCDEFGH
1ITEMID 1DATAID 2
2111-MS-1-24-2LHD16111-MS-1-24-2LH
3111-MS-1-24-3K3111-MS-1-24-2D16
4111-MS-1-24-4LHP2111-MS-1-24-3K3
5111-MS-1-24-5RC111-MS-1-24-4LH
6111-MS-1-24-6LHRC111-MS-1-24-4P2
7111-MS-1-24-5RC
8111-MS-1-24-6LH
9111-MS-1-24-6RC
10  
Sheet2
Cell Formulas
RangeFormula
G2:G10G2=IFERROR(@INDEX(B$2:B$10,AGGREGATE(15,6,(ROW($B$2:$B$10)-ROW($B$2)+1)/($C$2:$E$10>0),ROWS($A$1:$A1))),"")
H2:H10H2=IFERROR(IF(G2=G1,INDEX($B$2:$E$10,MATCH(G2,$B$2:$B$10,0),4),INDEX($B$2:$E$10,MATCH(G2,$B$2:$B$10,0),2)),"")
 
Upvote 0
A workaround is to mark the cells in the range TRUE or FALSE (when needed or not needed).
I use the columnnumbers to detect TRUE or FALSE.
Excel Formula:
=IFERROR(INDEX(B$2:B$10,AGGREGATE(15,6,(ROW($B$2:$B$10)-ROW($B$2)+1)/(($C$2:$E$10>0)*((COLUMN(C2:E10)<>4)*(ROW(C2:C10)-1)>0)),ROWS($A$1:$A1))),"")
 
Upvote 0
Solution
Thanks mart37, works great!
I actually learned a lot about the rows and columns functions that I was unsure of before.
The sheet I am using this in has a lot more rows and columns, I had to evaluate formula to figure out the 4 was a constant column to flag as a false, I should have read your second statement more carefully.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,606
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