Sumproduct not working

rahildhody

Board Regular
Joined
Aug 4, 2016
Messages
55
Office Version
  1. 365
Platform
  1. Windows
Hi,

I'm trying to calculate the headcount & salary by allocation for a 5yr period where the salaries change every year, but the headcount allocation stays the same. I think im doing something very silly as the sumproduct formula that im using doesnt seem to work.

Frmula used in F20 calculates correctly based on End of Month dates & calculates the count correctly as the period increases.

1717517211394.png


The same cannot be said when im trying to calculate the salary cost for the same period:

1717517227531.png


I'm sure its something really silly between the arrays but im not able to figure out what it is. Could someone please assist.
This is the fomula im trying to use in F28:

=SUMPRODUCT($N$5:$T$14*($D$5:$D$14=$D28)*($N$4:$T$4=$E28)*($F$5:$F$14<=F$18)*$G$5:$L$14*($G$4:$L$4=F$17))


Thanks in advance.

Cheers,
Rahil
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Would you be kind enough to post the data from A4:U16 in a table so the forum can copy it?
 
Upvote 0
Cost CentreProductsEoM Date2,0242,0252,0262,0272,0282,029Product 1Product 2Product 3Product 4Product 5Product 6Product 7Total
Admin & ProcessingProduct 429-Feb-2424,00025,20026,46027,78329,17230,631------100%------100%
Admin & ProcessingProduct 431-Jul-2324,50025,72527,01128,36229,78031,269------100%------100%
Admin & ProcessingProduct 430-Jun-2324,50025,72527,01128,36229,78031,269------100%------100%
Admin & ProcessingProduct 431-Mar-2424,00025,20026,46027,78329,17230,631------100%------100%
Admin & ProcessingProduct 430-Jun-2360,00063,00066,15069,45872,93076,577----50%25%25%----100%
Admin & ProcessingProduct 331-Mar-2424,00025,20026,46027,78329,17230,631----100%--------100%
Admin & ProcessingProduct 330-Apr-2435,00036,75038,58840,51742,54344,670----100%--------100%
Admin & ProcessingProduct 331-May-2435,00036,75038,58840,51742,54344,670----100%--------100%
Admin & ProcessingProduct 331-Jul-2224,50025,72527,01128,36229,78031,269----100%--------100%
Admin & ProcessingProduct 531-May-2429,00030,45031,97333,57135,25037,012--------100%----100%
 
Upvote 0
answer im looking for in:

F28 = (100%*24500 + 50%*60000) / 12 = 4541

G28 = (100%*24500 + 50%*60000 + 100%*24000)/12 = 6541 and so forth for 2024

L28 should be 2025 salaries
 
Upvote 0
How do you get to 1.5% in F20? There is only one row with Product 3 and a date less than 2024/2/29, and Product 3 column has 100% in that row.
 
Upvote 0
How do you get to 1.5% in F20? There is only one row with Product 3 and a date less than 2024/2/29, and Product 3 column has 100% in that row.
i understand thats a little misleading. Row 9: Product 4 is split 50% to Product 3. so total for Product 3 is 100% of row 13: Product 3 & 50% of Row 9: Product 4.

thats why in my sumproduct, i dont reference column E: Products as a match, instead use N4:T4 as my product differentiator.

hopefully that makes sense?
 
Upvote 0
i understand thats a little misleading. Row 9: Product 4 is split 50% to Product 3. so total for Product 3 is 100% of row 13: Product 3 & 50% of Row 9: Product 4.

thats why in my sumproduct, i dont reference column E: Products as a match, instead use N4:T4 as my product differentiator.

hopefully that makes sense?
it makes sense that I used the wrong range for looking up, but I still do not get 1.5%. How about posting the formula in F20, your image is nearly illegible?

I know you're looking for salary calculations, but I would like to get started with a formula based on what works.
 
Upvote 0
it makes sense that I used the wrong range for looking up, but I still do not get 1.5%. How about posting the formula in F20, your image is nearly illegible?

I know you're looking for salary calculations, but I would like to get started with a formula based on what works.
Formula in F20:
=SUMPRODUCT($N$5:$T$14*($D$5:$D$14=$D28)*($N$4:$T$4=$E28)*($F$5:$F$14<=F$18)

Formula in F28:
=SUMPRODUCT($N$5:$T$14*($D$5:$D$14=$D28)*($N$4:$T$4=$E28)*($F$5:$F$14<=F$18)*$G$5:$L$14*($G$4:$L$4=F$17))
 
Upvote 0
You're multiplying a 6 column array by a 7 column array, which is what causes the error.

Please update your profile to indicate which version of Office you are using as it will affect what options there are available to you to solve your problems.
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,114
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