Fancy sumproduct / index lookup

ryansm05

Board Regular
Joined
Sep 14, 2016
Messages
148
Office Version
  1. 365
Platform
  1. Windows
Hi,

Apologies for not uploading a workbook - company restrictions prevent me from this

However, I need to consolidate the employee data in table 2 at the very bottom and present it as per table 1 below this message. the main issue I'm encountering is that the pay category runs across the row but is then consolidate in the column. If anyone has a solution for this I would be very grateful.

Please use whatever col/row combination that works for you - I can adapt accordingly.

Thanks in advance!
Ryan



Pay Category19/2019/2019/20
P01P02P03
Basic Pay360039004200
Pension360390420
National Insurance496.8538.2579.6


19/2019/2019/2019/2019/2019/2019/2019/2019/20
P01P01P01P02P02P02P03P03P03
Basic PayPensionNational InsuranceBasic PayPensionNational InsuranceBasic PayPensionNational Insurance
employee1
1000
100
138
1100
110
151.8
1200
120
165.6
employee2
1200
120
165.6
1300
130
179.4
1400
140
193.2
employee3
1400
140
193.2
1500
150
207
1600
160
220.8
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Here is my solution. It does not use any sophisticated tools. I simply merged cells into groups of 3, so that the consecutive sums take every third column into account.
If you copy it to the right including formatting, it will act as desired.

J.Ty.

Book1
ABCDEFGHIJKLMNOPQRST
1employee110001001381100110151.81200120165.6360039004200
2employee21200120165.61300130179.41400140193.2360390420
3employee31400140193.215001502071600160220.8496.8538.2579.6
Sheet1
Cell Formulas
RangeFormula
L1, O1, R1L1=SUM(B1:B3)
L2, O2, R2L2=SUM(C1:C3)
L3, O3, R3L3=SUM(D1:D3)
 
Upvote 0
Hi Ryan
Assuming the data you posted starts in A1,

In B3:

=SUMPRODUCT(($B$9:$J$9=B$2)*($B$10:$J$10=$A3)*$B$11:$J$13)

Copy down and across
 
Upvote 0
Hi Ryan
Assuming the data you posted starts in A1,

In B3:

=SUMPRODUCT(($B$9:$J$9=B$2)*($B$10:$J$10=$A3)*$B$11:$J$13)

Copy down and across

I was so close but was bracketing the
$B$11:$J$13. I'll remember that for future!

Thanks for your help - it's much appreciated!

Ryan
 
Upvote 0

Similar threads

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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