SUMIFS or SUMPRODUCT or something else :(

kapvg

New Member
Joined
Jun 30, 2018
Messages
25
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi,

I am stuck with trying to get the below dataset into a summary table using formulae (cannot use VBA as it is a marco-free file).

Book1.xlsx
BCDEFGHIJKLMNOPQ
2Sample dataset
3AccountWeightageJan-21Feb-21Mar-21Apr-21May-21Jun-21Jul-21Aug-21Sep-21Oct-21Nov-21Dec-21TOTALSpecial condition
4Acct 120.00%$20,000$20,000$20,000$20,000$20,000$20,000$24,000TRUE
5Acct 250.00%$10,000$10,000$10,000$10,000$10,000$10,000$30,000TRUE
6Acct 190.00%$30,000$30,000$30,000$30,000$30,000$30,000$162,000FALSE
7Acct 230.00%$30,000$30,000$18,000FALSE
8Acct 215.00%$25,000$25,000$7,500FALSE
9Acct 310.00%$15,000$15,000$15,000$15,000$6,000FALSE
10Acct 370.00%$20,000$20,000$20,000$20,000$56,000TRUE
11Acct 380.00%$30,000$30,000$30,000$30,000$96,000FALSE
12Acct 325.00%$20,000$20,000$20,000$20,000$20,000$20,000$20,000$20,000$20,000$20,000$20,000$20,000$60,000TRUE
13Acct 250.00%$50,000$50,000$50,000$75,000TRUE
14Acct 175.00%$10,000$10,000$10,000$10,000$10,000$10,000$10,000$10,000$10,000$10,000$10,000$10,000$90,000TRUE
Sheet1
Cell Formulas
RangeFormula
P4:P14P4=SUM(Table1[@[Jan-21]:[Dec-21]])*[@Weightage]


Book1.xlsx
CDEFGHIJKLMNOP
17Summary table - GOAL (currently prepared manually but need help to prepare this via formulae)
18AccountJan-21Feb-21Mar-21Apr-21May-21Jun-21Jul-21Aug-21Sep-21Oct-21Nov-21Dec-21TOTAL
19Acct 1$11,500$7,500$11,500$7,500$11,500$7,500$11,500$7,500$11,500$7,500$11,500$7,500$114,000
20Acct 2$0$5,000$30,000$30,000$30,000$5,000$5,000$0$0$0$0$0$105,000
21Acct 3$5,000$19,000$5,000$5,000$19,000$5,000$5,000$19,000$5,000$5,000$19,000$5,000$116,000
22$16,500$31,500$46,500$42,500$60,500$17,500$21,500$26,500$16,500$12,500$30,500$12,500$335,000
Sheet1
Cell Formulas
RangeFormula
D19:O19D19=IF($Q4=TRUE, D4*$C4, 0) + IF($Q6=TRUE, D6*$C6, 0) + IF($Q14=TRUE, D14*$C14, 0)
P19:P21P19=SUM(Table13[@[Jan-21]:[Dec-21]])
D20:O20D20=IF($Q5=TRUE, D5*$C5, 0) + IF($Q7=TRUE, D7*$C7, 0) + IF($Q8=TRUE, D8*$C8, 0) + IF($Q13=TRUE, D13*$C13, 0)
D21:O21D21=IF($Q9=TRUE, D9*$C9, 0) + IF($Q10=TRUE, D10*$C10, 0) + IF($Q11=TRUE, D11*$C11, 0) + IF($Q12=TRUE, D12*$C12, 0)
D22D22=SUM([Jan-21])
E22E22=SUM([Feb-21])
F22F22=SUBTOTAL(109,[Mar-21])
G22G22=SUBTOTAL(109,[Apr-21])
H22H22=SUBTOTAL(109,[May-21])
I22I22=SUBTOTAL(109,[Jun-21])
J22J22=SUBTOTAL(109,[Jul-21])
K22K22=SUBTOTAL(109,[Aug-21])
L22L22=SUBTOTAL(109,[Sep-21])
M22M22=SUBTOTAL(109,[Oct-21])
N22N22=SUBTOTAL(109,[Nov-21])
O22O22=SUBTOTAL(109,[Dec-21])
P22P22=SUBTOTAL(109,[TOTAL])


Essentially, I want to get the weighted total per month for each account only when the 'Special Condition' = TRUE. I have been scouring the web, forums for a couple of hours and tried various SUMIFS and SUMPRODUCT combinations before giving up :(

Please advise if there is a formula based approach that can be used to prepare the summary table as shown above.

thanks!!
~kg
 
Thanks for that. (y)


In that case you would not be able to use the formula I suggested in post #8 but you could try this one, again copied across and down.

Excel Formula:
=SUMPRODUCT((Table1[[Account]:[Account]]=Table13[@[Account]:[Account]])*(Table1[[Special condition]:[Special condition]])*Table1[[Weightage]:[Weightage]]*Table1[Jan-21])

kapvg_1.xlsm
ABCDEFGHIJKLMNOPQ
1
2
3AccountWeightageJan-21Feb-21Mar-21Apr-21May-21Jun-21Jul-21Aug-21Sep-21Oct-21Nov-21Dec-21TOTALSpecial condition
4Acct 10.220000200002000020000200002000024000TRUE
5Acct 20.510000100001000010000100001000030000TRUE
6Acct 10.9300003000030000300003000030000162000FALSE
7Acct 20.3300003000018000FALSE
8Acct 20.1525000250007500FALSE
9Acct 30.1150001500015000150006000FALSE
10Acct 30.72000020000200002000056000TRUE
11Acct 30.83000030000300003000096000FALSE
12Acct 30.2520000200002000020000200002000020000200002000020000200002000060000TRUE
13Acct 20.550000500005000075000TRUE
14Acct 10.7510000100001000010000100001000010000100001000010000100001000090000TRUE
15
16
17
18AccountJan-21Feb-21Mar-21Apr-21May-21Jun-21Jul-21Aug-21Sep-21Oct-21Nov-21Dec-21TOTAL
19Acct 1115007500115007500115007500115007500115007500115007500114000
20Acct 2050003000030000300005000500000000105000
21Acct 35000190005000500019000500050001900050005000190005000116000
Sheet1
Thanks for this.
I tried the solution in post #6 SUMIFS or SUMPRODUCT or something else :( and that one works as well.

Kudos to both experts ?

Can I mark 2 posts as solutions?
 
Last edited:
Upvote 0

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Can I mark 2 posts as solutions?
No, you just choose the one that suited you the best, or at the one you ended up using. (y)

The main thing is that you got something that you are happy with. :)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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