Help adding multiple instances based on date.

GazNicki

Board Regular
Joined
Nov 30, 2010
Messages
78
Hi

Please bear with me on this one.

I have a large spreadsheet (layout below) which tracks the sale of items (listed down in column A) by customer. Each customer takes a range of items, so therefore there are multiple instances of these items in Column A.

In row 1, starting at cell B2 is the week ending date. (Cell A2 contains the weekending date as a number currently too). The sheet spans across from B2:BC2 as the weeks go along the top.

On a separate worksheet in the same workbook, I want to sum up all the instances of an item, but specific to one week. I can use SUMIF or SUMPRODUCT, but that requires me to define a range which is static, but I want the week to change.

I have tried to use SUMIFS in order to define two criteria, but I am presented with a #VALUE ! error everytime. I am assuming this is because one of my ranges is vertical and the other horizontal. Is this the case, or have I done something wrong?

abcdefghi
14310643113431204312743134431414314843155
206 Jan13 Jan20 Jan27 Jan03 Feb10 Feb17 Feb24 Feb
3Item 1710886295915248112461022404577445114
4Item 1114574458432551454451088405411245234
5Item 200122451112541255712451599645455
6Item 312224500011112454587785584451

<tbody>
</tbody>
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
try this sumproduct() solution


Excel 2013/2016
ABCDEFGHI
14310643113431204312743134431414314843155
206-Jan13-Jan20-Jan27-Jan03-Feb10-Feb17-Feb24-Feb
3Item 1710886295915248112461022404577445114
4Item 1114574458432551454451088405411245234
5Item 200122451112541255712451599645455
6Item 312224500011112454587785584451
7
8
917-Feb
10Item 199886
Sheet2
Cell Formulas
RangeFormula
B10=SUMPRODUCT($B$3:$I$6,(A3:A6=A10)*(B2:I2=B9))
 
Upvote 0
Hello,

Please see if pivot option can help.

For data like this:
ItemsWeek1Week2Week3
Item12245
Item12224
Item123
Item22434
Item22254
Item3213432

<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>
</tbody>

<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>


Pivot can do this:

Row LabelsSum of Week1Sum of Week2Sum of Week3
Item1442828
Item2244358
Item3213432
Grand Total89105118

<colgroup><col><col span="3"></colgroup><tbody>
</tbody>

</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,358
Messages
6,124,487
Members
449,165
Latest member
ChipDude83

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