SumProduct with If statement changing criteria

DShack

Board Regular
Joined
Jan 15, 2014
Messages
64
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hello...
I have an issue where there is an Invoice ID that changes at various times with blanks in-between the changes and i need to calculate the total when the invoice changes. Here is a sample of the data that i am working with. The row count if over 200K lines. Any help is greatly appreciated.

*Invoice IDLine Number*Line Type*AmountInvoice QuantitySum Total
1001​
1​
ITEM
500.00​
2​
1900​
2​
ITEM
300.00​
3​
1002​
1​
ITEM
250.00​
4​
3100​
2​
ITEM
300.00​
5​
3​
ITEM
100.00​
6​
1003​
1​
ITEM
100.00​
4​
3600​
2​
ITEM
200.00​
1​
3​
ITEM
300.00​
2​
4​
ITEM
400.00​
6​
1004​
1​
ITEM
100.00​
2​
2​
ITEM
200.00​
1​
3​
ITEM
300.00​
6​
4​
ITEM
400.00​
4​
5​
ITEM
500.00​
2​
1005​
1​
ITEM
1000.00​
1​
1006​
1​
ITEM
100.00​
3​
2​
ITEM
100.00​
5​
1007​
1​
ITEM
200.00​
4​
2​
ITEM
300.00​
3​
3​
ITEM
400.00​
2​
1008​
1​
ITEM
100.00​
1​
2​
ITEM
100.00​
2​
3​
ITEM
100.00​
3​
1009​
1​
ITEM
200.00​
1​
2​
ITEM
300.00​
1​
1010​
1​
ITEM
300.00​
1​
1011​
1​
ITEM
100.00​
1​
2​
ITEM
100.00​
1​
3​
ITEM
100.00​
1​
1012​
1​
ITEM
100.00​
1​
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Fill the Account numbers down.
There are explanations of how to do this on the forum.
Ensure that you have numbers not TEXT in Columns D and E.

T202108b.xlsm
ABCDEF
1
2
3Invoice IDLine Number*Line Type*AmountInvoice QuantitySum Total
410011ITEM500.0021900
510012ITEM300.003 
610021ITEM250.0043100
710022ITEM300.005 
810023ITEM100.006 
3c
Cell Formulas
RangeFormula
F4:F8F4=IF(A4=A3,"",SUMPRODUCT(--($A$4:A5000=A4),$D$4:D5000,$E$4:E5000))
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,893
Members
449,097
Latest member
dbomb1414

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