SUM cells based on criteria

sabi.kiss

Board Regular
Joined
Nov 7, 2009
Messages
118
I would need a bit of help here.
Take ROW 1 as the 26 pay periods of the year. Each pay period is a fortnight, dates situated in ROW 2. From ROW 3 down we've got the actual hours worked by my employees.
What I'm after is, when I write the pay period number in the criteria cell, it matches with the dates for that particular pay period and SUMs the hours up.

Thanks in advance.
Sabi
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Let's say the pay periods are in the range B1:AA1, the hours worked are in B3:AA10 and the pay period you want to sum is in A11. In some other cell enter:

=SUM(INDEX(B3:AA10,,MATCH(A11,B1:AA1,FALSE)))
 
Upvote 0
I have to be probably more specific.
ROW 2 has the dates of the specific pay period, for example PP02 is in between 27.6.11 and 10.7.11. ROW 1 has merged cells covering the dates specific to this pay period. So, cell B1 covers cells B3:O3 (a full fortnight). The hours worked are in ROW 3 downwards, depending on how many employees I've got on the list. Criteria for SUMing up the particular fortnight is according to the PP chosen.
ROW 1 has got all 26 pay periods of the financial year.
For each employee I've got their working hours for the whole financial year.
Unfortunately I can't upload a sheet, because I don't know how.
See if this was more specific than the previous message.
Thanks a lot for your help.
Sabi
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

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