Sum Values in Row Between Date Range If Match Criteria?

Jtucker10278

Board Regular
Joined
May 14, 2017
Messages
55
I don't know what happened but i tried to post this and its gone, so here it is again


I have a table (does not have to be a "table'") with names down the left and all 365 dates across the top

1/11/21/31/41/51/61/7
Adam3452334
John1434235
Dave6425346
Joe3421156

<tbody>
</tbody>

I am trying to come up with a formula that will sum that values for adam for dates between x and y (also looking to this with average and count)



The end result would be another table/spreadsheet with each employees totals and average for each week

Week 1Week 1Week 2Week 2
TotalAverageTotalAverage
Adam234.6183.8
John173.5153
Dave193.8112.01
Joe61.181.4

<tbody>
</tbody>

I'm always working with week totals so the date range will always be 7 days, or if possible using weeknum to calculate.

Also I can rotate the headings with names across the top and dates down the side if that will make it work

If no formula like this exists I am open to suggestions on other ways to tackle the problem. I'm pretty decent with excel so any help or thoughts wouls be apreciated
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hi,

Take a look at this and see if this helps:


Book1
ABC
1Week 1Week 1
2TotalAverage
3Adam243,4
4John223,1
5Dave304,3
6Joe223,1
Sheet2
Cell Formulas
RangeFormula
B3=SUMPRODUCT((WEEKNUM(Sheet1!$B$1:$CN$1+0)=VALUE(RIGHT(B$1,2)))*(Sheet1!$A$2:$A$5=Sheet2!$A3)*(Sheet1!$B$2:$CN$5))
C3=B3/SUMPRODUCT((WEEKNUM(Sheet1!$B$1:$CN$1+0,1)=VALUE(RIGHT(B$1,2)))*(Sheet1!$A$2:$A$5=Sheet2!$A3)*(Sheet1!$B$2:$CN$5<>""))
 
Upvote 0
Unfortunately that keeps coming back as 0

I did some looking this morning and found sum intersection formulas that are kind of working.

For example if i put all the columns in week 1 in a named range "Week1" and then make row 3 a named range "adam"

the formula is =sum(Week1 adam)

and that works now i just need to find a way to write the formula so that instead of using named ranges i could Point to the named range. if that makes sense?

thanks for any thoughts
 
Upvote 0
GOT IT!

=SUM(INDIRECT(B12) INDIRECT(A16))

Cell B12 contains text "week1"
Cell A16 contains text "adam"

sometimes i forget how absolutly amazing Excel is, and how much I love it.

Thanks for your help getting me there.
 
Upvote 0

Forum statistics

Threads
1,215,078
Messages
6,122,997
Members
449,093
Latest member
masterms

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