Help with Index/match formulas

willow1985

Well-known Member
Joined
Jul 24, 2019
Messages
886
Office Version
  1. 365
Platform
  1. Windows
I am needing help with 2 index match formulas (wondering if they are possible)

In the below picture I have my data source (left) and my table (right)
In column H and I on the right is where I am wanting the 2 index match formulas (in yellow).
In the table on the right, if you enter the Job # in column G, I would like the following to happen:

The first index match formula in column H: I want it to Sum all Qty Shipped for every Job# match
The second index match formula in column I (I don't know if it is possible): I would want it to return the results in order they are found. 1st result, 2nd result etc until no more matches.

Any help would be appreciated

1594665239070.png
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
You can do col H with a sumif
=sumifs(b:b,a:a,g2)

Can you post some sample data using the XL2BB add-in, that way I don't need to recreate your data, for the other formula. Thanks
 
Upvote 0
H would be a sumif, so
=sumifs($B$2:$B$12,$A$2:$A$12,G2)

I try
=IFERROR(AGGREGATE(15,6,($C$2:$C$12)/($A$2:$A$12=$G2),ROW(A1)),"")
 
Upvote 0
Is this what you want

Book1
ABCDEFGHIJ
1
2Job#Qty ShippedPacket ListCountTotal Quantity ShippedCountif
3JB151741234JB151751234
4JB151714444JB151754444
5JB151707929JB151757929
6JB152825578JB152825578
7JB152241182JB152251182
8JB152211209JB152251209
9JB152201828JB152251828
10JB1537711187JB1537711187
11JB15370JB1537710
12JB154058245JB154058245
13
14
15
Sheet3
Cell Formulas
RangeFormula
H3:H12H3=SUMIF($A$3:$A$12,G3,$B$3:$B$12)
I3:I12I3=IFERROR(INDEX($C$3:$C$12,AGGREGATE(15,6,ROW($A$1:$A$10)/($A$3:$A$12=G3),COUNTIF($G$3:G3,G3))),"")
 
Upvote 0
@CA_Punit
I would recommend using something like
=INDEX($C$2:$C$12,AGGREGATE(15,6,(ROW($C$2:$C$12)-ROW($C$2)+1)/($A$2:$A$12=G3),COUNTIFS(G$3:G3,G3)))

If you insert another row above the data, or delete row 1 then your formula will fail.
 
Upvote 0
Using the data that CA_Punit created
+Fluff New.xlsm
ABCDEFGHI
1Job#Qty ShippedPacket ListTotal Quantity ShippedPacklist
2JB151741234JB151751234
3JB151714444JB151754444
4JB151707929JB151757929
5JB152825578JB152825578
6JB152241182JB152251182
7JB152211209JB152251209
8JB152201828JB152251828
9JB1537711187JB1537711187
10JB15370JB1537710
11JB154058245JB154058245
Data
Cell Formulas
RangeFormula
H2:H11H2=SUMIFS(B:B,A:A,G2)
I2:I11I2=INDEX($C$2:$C$11,AGGREGATE(15,6,(ROW($C$2:$C$11)-ROW($C$2)+1)/($A$2:$A$11=G2),COUNTIFS(G$2:G2,G2)))
 
Upvote 0
Using the data that CA_Punit created
+Fluff New.xlsm
ABCDEFGHI
1Job#Qty ShippedPacket ListTotal Quantity ShippedPacklist
2JB151741234JB151751234
3JB151714444JB151754444
4JB151707929JB151757929
5JB152825578JB152825578
6JB152241182JB152251182
7JB152211209JB152251209
8JB152201828JB152251828
9JB1537711187JB1537711187
10JB15370JB1537710
11JB154058245JB154058245
Data
Cell Formulas
RangeFormula
H2:H11H2=SUMIFS(B:B,A:A,G2)
I2:I11I2=INDEX($C$2:$C$11,AGGREGATE(15,6,(ROW($C$2:$C$11)-ROW($C$2)+1)/($A$2:$A$11=G2),COUNTIFS(G$2:G2,G2)))

The Sumifs formula I should have known. having an off day...

I tried the other and got it to work with my original workbook.

Thank you very much!
 
Upvote 0

Forum statistics

Threads
1,214,650
Messages
6,120,734
Members
448,987
Latest member
marion_davis

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