Dynamically sum row values based on column headers?

cdh

New Member
Joined
Jul 8, 2005
Messages
9
Hi all,

I have been racking my brain for over an hour, but can't come up with a solution, so I could use some help.

I have a data set that looks something like this (and, unfortunately, changing the row/column orientation is not possible):

106jy2c.jpg


And here is some supplementary data:

dbqnbc.jpg



What I need to be able to do is dynamically sum the costs of a project between 2 given weeks.

For example:
Per the week range in the supplementary data, what is the sum of the Project1 costs between weeks 2 & 5?

The result of which would need to look at the primary table and thus sum C2:F2 (9,516 + 3,807 + 3,157 + 7,418).


I have tried various combinations of INDEX, MATCH, HLOOKUP, SUMPRODUCT, etc., but I seem to be missing something.

Can anyone please shed some light on this?

Thank you!
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Try this

IN D11 and filled down
=SUM(INDEX($B$2:$H$7,MATCH(A11,$A$2:$A$7,0),MATCH(B11,$B$1:$H$1,0)):INDEX($B$2:$H$7,MATCH($A11,$A$2:$A$7,0),MATCH(C11,$B$1:$H$1,0)))

Hope that helps...
Personal.xls
ABCDEFGH
1Week1Week2Week3Week4Week5Week6Week7
2Project188662539448836
3Project241511170656320
4Project33014708358247
5Project487587073352955
6Project513425633748370
7Project679962024738163
8
9StartWeekEndWeek
10
11Project1Week1Week3179
12Project2Week3Week481
13Project3Week4Week7190
Sheet1
 
Upvote 0

Forum statistics

Threads
1,216,122
Messages
6,128,964
Members
449,480
Latest member
yesitisasport

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