Sum with vertical and horizontal references

atelian

New Member
Joined
Sep 29, 2014
Messages
2
Hi All,

I'm trying to sum a range of data with multiple vertical and horizontal criteria. Below is a table with sample data. For example, I'd like to sum Facebook Impressions if the date is between 9/26 and 9/28. All of it needs to change dynamically based on reference cells.

[TABLE="width: 594"]
<colgroup><col><col span="8"></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"]26-Sep[/TD]
[TD="align: right"]27-Sep[/TD]
[TD="align: right"]28-Sep[/TD]
[TD="align: right"]29-Sep[/TD]
[TD="align: right"]30-Sep[/TD]
[TD="align: right"]1-Oct[/TD]
[TD="align: right"]2-Oct[/TD]
[/TR]
[TR]
[TD]Impressions[/TD]
[TD]Facebook[/TD]
[TD="align: right"]500[/TD]
[TD="align: right"]510[/TD]
[TD="align: right"]520[/TD]
[TD="align: right"]530[/TD]
[TD="align: right"]540[/TD]
[TD="align: right"]550[/TD]
[TD="align: right"]560[/TD]
[/TR]
[TR]
[TD]Clicks[/TD]
[TD]Facebook[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]51[/TD]
[TD="align: right"]52[/TD]
[TD="align: right"]53[/TD]
[TD="align: right"]54[/TD]
[TD="align: right"]55[/TD]
[TD="align: right"]56[/TD]
[/TR]
[TR]
[TD]Spend[/TD]
[TD]Facebook[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]23[/TD]
[TD="align: right"]24[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]26[/TD]
[/TR]
[TR]
[TD]Impressions[/TD]
[TD]Twitter[/TD]
[TD="align: right"]500[/TD]
[TD="align: right"]510[/TD]
[TD="align: right"]520[/TD]
[TD="align: right"]530[/TD]
[TD="align: right"]540[/TD]
[TD="align: right"]550[/TD]
[TD="align: right"]560[/TD]
[/TR]
[TR]
[TD]Clicks[/TD]
[TD]Twitter[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]51[/TD]
[TD="align: right"]52[/TD]
[TD="align: right"]53[/TD]
[TD="align: right"]54[/TD]
[TD="align: right"]55[/TD]
[TD="align: right"]56[/TD]
[/TR]
[TR]
[TD]Spend[/TD]
[TD]Twitter[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]23[/TD]
[TD="align: right"]24[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]26

[/TD]
[/TR]
</tbody>[/TABLE]


Any thoughts? This one is killing me.

Thanks!
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Try like this


Excel 2010
ABCDEFGHI
126-Sep27-Sep28-Sep29-Sep30-Sep01-Oct02-Oct
2ImpressionsFacebook500510520530540550560
3ClicksFacebook50515253545556
4SpendFacebook20212223242526
5ImpressionsTwitter500510520530540550560
6ClicksTwitter50515253545556
7SpendTwitter20212223242526
8
9
10ImpressionsFacebook1530
1126-Sep
1228-Sep
Amos
Cell Formulas
RangeFormula
C10=SUMPRODUCT(($A$2:$A$7=A10)*($B$2:$B$7=$B$10)*($C$1:$I$1>=$B$11)*($C$1:$I$1<=$B$12)*$C$2:$I$7)
[TABLE="width: 85%"]
<tbody></tbody>[/TABLE]


I didn't see initially that you wanted both impressions and Facebook for example, now i have and have modified the formula accordingly
 
Last edited:
Upvote 0
Excel Workbook
ABCDEFGHI
1Hdr1Hdr226-Sep27-Sep28-Sep29-Sep30-Sep1-Oct2-Oct
2ImpressionsFacebook500510520530540550560
3ClicksFacebook50515253545556
4SpendFacebook20212223242526
5ImpressionsTwitter500510520530540550560
6ClicksTwitter50515253545556
7SpendTwitter20212223242526
8
9Hdr1Hdr2Date1Date2Sum
10ImpressionsFacebook26-Sep28-Sep1530
11SpendTwitter26-Sep30-Sep110
Sheet11
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,304
Members
452,633
Latest member
DougMo

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