SUMIFS values per item

Arek92

New Member
Joined
Jan 29, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I've been digging to find a solution to my problem but didn't seem to find any, so here I am.
I'm trying to write a formula that would sum values in a table column per item in the other column. The problem is, I need to sum values per item if that sum per item is greater than a specified amount, which is why I'm unable to name the item to sum the values by. Also, I may need to return that item in another table. Any help would be greatly appreciated.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Welcome to MrExcel Message Board.
Try this:
TEST.xlsx
ABCDEFGHI
1Item #ValuesSumif > 5050
2Item134item173
3Item228item2152
4Item394item394
5Item481item4239
6Item140
7Item295
8Item346
9Item426
10Item149
11Item257
12Item333
13Item481
14Item173
15Item230
16Item342
17Item440
18Item150
19Item231
20Item324
21Item477
22
Sheet2
Cell Formulas
RangeFormula
E2:E5E2=SUMIFS($B$2:$B$21,$A$2:$A$21,D2,$B$2:$B$21,">"&$G$1)
 
Upvote 0
Welcome to MrExcel Message Board.
Try this:
TEST.xlsx
ABCDEFGHI
1Item #ValuesSumif > 5050
2Item134item173
3Item228item2152
4Item394item394
5Item481item4239
6Item140
7Item295
8Item346
9Item426
10Item149
11Item257
12Item333
13Item481
14Item173
15Item230
16Item342
17Item440
18Item150
19Item231
20Item324
21Item477
22
Sheet2
Cell Formulas
RangeFormula
E2:E5E2=SUMIFS($B$2:$B$21,$A$2:$A$21,D2,$B$2:$B$21,">"&$G$1)
Thank you for replying so quickly. My problem is a bit more complex to solve it as you proposed, for a couple of reasons:
1. There is more than one column to have the summed values match by, ie sum values per item per location. Several different items may be located in one location, as well as one item may be located in several different locations. Also, every item may have several different lot numbers.
2. I'm working on a large table (11k records) and listing all items seems counterproductive.
I figured out the first part and are able to return the location per item, but it still doesn't account for the lot number. What I'm looking for is the summed value in one location and of one lot number that matches the greater than criteria.
I apologize for not being concise enough in my opening post.
 
Upvote 0
Please upload your example file & Desired Results with XL2BB ADDIN (Preferable) OR upload it at free uploading site e.g. www.dropbox.com or googledrive or onedrive and insert link here.
 
Upvote 0
What means sum of Lot No. or Bin? They aren't Numbers.
Are You want Countifs?
Please Describe with Example.
 
Upvote 0
What means sum of Lot No. or Bin? They aren't Numbers.
Are You want Countifs?
Please Describe with Example.
Those stand for the lot no. and bin of the values the sum of which meets the greater than or equal to the required quantity criteria. For this to work, the formula would have to sum values of the same lot no. first, and the same bin second, also considering there may be other bins/lot no. meeting this criteria, so the minimal one would be desirable here. Let me try and visualize an example below:
I hope this provides more clarification on the problem.
 
Upvote 0
See Two formula at Columns J & K

Zeszyt1.xlsx
ABCDEFGHIJKL
1ItemRequired qtySingle matchBinSingle match Lot no.Single match Bin qtySummed match binSummed match lot no.Summed match qtySumproductSumifs
2101100#N/A#N/A01/1/21A3301200
3102201/3/22A201/2/12A1457070
4103125#N/A#N/A02/1/43A4351700
5104353/2/34A353/2/14A754040
6105100#N/A#N/A02/5/15A230500
7106104/4/46B154/4/46B151515
8
Master list
Cell Formulas
RangeFormula
C2:C7C2=INDEX(Bins,MATCH(1,([@[Single match Bin qty]]=Bins[Qty])*([@Item]=Bins[Item]),0),3)
D2:D7D2=INDEX(Bins,MATCH(1,([@[Single match Bin qty]]=Bins[Qty])*([@Item]=Bins[Item]),0),2)
E2:E7E2=MIN(IF([@Item]=Bins[Item],IF([@[Required qty]]<=Bins[Qty],Bins[Qty])))
F2:F7F2=INDEX(Bins,MATCH(1,([@[Required qty]]<=SUM(Bins[Qty]))*([@Item]=Bins[Item]),0),3)
G2:G7G2=INDEX(Bins,MATCH(1,([@[Required qty]]<=SUM(Bins[Qty]))*([@Item]=Bins[Item]),0),2)
H2:H7H2=SUM(IF([@Item]=Bins[Item],IF([@[Required qty]]<=SUM(Bins[Qty]),Bins[Qty])))
J2:J7J2=SUMPRODUCT((Bins[Qty])*(Bins[Qty]>=PickList[@[Single match Bin qty]])*(Bins[Bin]=PickList[@[Summed match bin]])*(PickList[@Item]=Bins[Item])*(Bins[Lot no.]=PickList[@[Summed match lot no.]]))
K2:K7K2=SUMIFS(Bins[Qty],Bins[Bin],PickList[@[Summed match bin]],Bins[Lot no.],PickList[@[Summed match lot no.]],Bins[Item],PickList[@Item],Bins[Qty],">="&PickList[@[Required qty]])
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
See Two formula at Columns J & K

Zeszyt1.xlsx
ABCDEFGHIJKL
1ItemRequired qtySingle matchBinSingle match Lot no.Single match Bin qtySummed match binSummed match lot no.Summed match qtySumproductSumifs
2101100#N/A#N/A01/1/21A3301200
3102201/3/22A201/2/12A1457070
4103125#N/A#N/A02/1/43A4351700
5104353/2/34A353/2/14A754040
6105100#N/A#N/A02/5/15A230500
7106104/4/46B154/4/46B151515
8
Master list
Cell Formulas
RangeFormula
C2:C7C2=INDEX(Bins,MATCH(1,([@[Single match Bin qty]]=Bins[Qty])*([@Item]=Bins[Item]),0),3)
D2:D7D2=INDEX(Bins,MATCH(1,([@[Single match Bin qty]]=Bins[Qty])*([@Item]=Bins[Item]),0),2)
E2:E7E2=MIN(IF([@Item]=Bins[Item],IF([@[Required qty]]<=Bins[Qty],Bins[Qty])))
F2:F7F2=INDEX(Bins,MATCH(1,([@[Required qty]]<=SUM(Bins[Qty]))*([@Item]=Bins[Item]),0),3)
G2:G7G2=INDEX(Bins,MATCH(1,([@[Required qty]]<=SUM(Bins[Qty]))*([@Item]=Bins[Item]),0),2)
H2:H7H2=SUM(IF([@Item]=Bins[Item],IF([@[Required qty]]<=SUM(Bins[Qty]),Bins[Qty])))
J2:J7J2=SUMPRODUCT((Bins[Qty])*(Bins[Qty]>=PickList[@[Single match Bin qty]])*(Bins[Bin]=PickList[@[Summed match bin]])*(PickList[@Item]=Bins[Item])*(Bins[Lot no.]=PickList[@[Summed match lot no.]]))
K2:K7K2=SUMIFS(Bins[Qty],Bins[Bin],PickList[@[Summed match bin]],Bins[Lot no.],PickList[@[Summed match lot no.]],Bins[Item],PickList[@Item],Bins[Qty],">="&PickList[@[Required qty]])
Press CTRL+SHIFT+ENTER to enter array formulas.
Holy cow, thank you. The formula works like a charm, but... I can't understand how. Why does it reference the Single match Bin qty and Summed match bin columns from my table? These formulas that I wrote seem wrong and I don't understand how referencing them in your formula gave the exact result I was looking for. How would we go about only using the item no. and required qty from the "Master list" tab?
 
Upvote 0
You're Welcome & Glad We can Help. GO to Formula, And Check Step to Step TO understand it. (formula Tab > Evaluate formula)
 
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,737
Members
449,050
Latest member
excelknuckles

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