COUNTIF and VLookup Help

ECAshley

New Member
Joined
Jul 30, 2013
Messages
3
Hello - I have designed a spreadsheet that seems to be a little cumbersome to gather data from. In the long and short of it, I'm trying to create a count for how many ads we posted, in which cities, during which quarters. Here is how the data is laid out:[TABLE="width: 688"]
<tbody>[TR]
[TD]Location
[/TD]
[TD]Quarter - Website A
[/TD]
[TD]Quarter - Website B
[/TD]
[TD]Website A
[/TD]
[TD]Website B
[/TD]
[/TR]
[TR]
[TD]Portland, OR
[/TD]
[TD]Q1
[/TD]
[TD]Q2
[/TD]
[TD]1/1/13
[/TD]
[TD]4/6/13
[/TD]
[/TR]
[TR]
[TD]Yakima, WA
[/TD]
[TD]Q2
[/TD]
[TD]Q2
[/TD]
[TD]5/16/13
[/TD]
[TD]5/16/13
[/TD]
[/TR]
[TR]
[TD]Springfield, ME
[/TD]
[TD]Q1
[/TD]
[TD]Q3
[/TD]
[TD]1/16/13
[/TD]
[TD]6/25/13
[/TD]
[/TR]
[TR]
[TD]New York, NY
[/TD]
[TD]Q4
[/TD]
[TD]Q3
[/TD]
[TD]7/26/13
[/TD]
[TD]6/4/13
[/TD]
[/TR]
</tbody>[/TABLE]

I need to be able to count how many ads we posted (date denotes 1 ad), during each quarter, for each location.
<br>Thank you for any help you can provide.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
How do you want the end result to look like?

I am thinking of using a SUMPRODUCT =SUMPRODUCT(--(B1:B25="Q1"),--(D1:D25=DATE(2013,1,1))) so it counts how many Q1's you have posted for the date 1/1/2013
 
Upvote 0
I was hoping it would look something like this:[TABLE="width: 870"]
<tbody>[TR]
[TD][/TD]
[TD="colspan: 4"] Website A
[/TD]
[TD="colspan: 4"]Website B
[/TD]
[TD="colspan: 4"]Website C
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Q1
[/TD]
[TD]Q2
[/TD]
[TD]Q3
[/TD]
[TD]Q4
[/TD]
[TD]Q1
[/TD]
[TD]Q2
[/TD]
[TD]Q3
[/TD]
[TD]Q4
[/TD]
[TD]Q1
[/TD]
[TD]Q2
[/TD]
[TD]Q3
[/TD]
[TD]Q4
[/TD]
[/TR]
[TR]
[TD]Portland, OR
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Yakima, WA
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Springfield, ME
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]New York, NY
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Something like this...?

Excel 2007
ABCDEFGHI
1LocationWebsite AWebsite B
2Q1Q2Q3Q4Q1Q2Q3Q4
3Portland, OR1000
4Yakima, WA0100
5Springfield, ME1000
6New York, NY0001
7Totals2101
Sheet1
Cell Formulas
RangeFormula
B3=SUMPRODUCT(--(Sheet2!$A$2:$A$5=Sheet1!A3),--(Sheet2!$B$2:$B$5=Sheet1!$B$2),--(Sheet2!$D$2:$D$5>0))
B4=SUMPRODUCT(--(Sheet2!$A$2:$A$5=Sheet1!A4),--(Sheet2!$B$2:$B$5=Sheet1!$B$2),--(Sheet2!$D$2:$D$5>0))
B5=SUMPRODUCT(--(Sheet2!$A$2:$A$5=Sheet1!A5),--(Sheet2!$B$2:$B$5=Sheet1!$B$2),--(Sheet2!$D$2:$D$5>0))
B6=SUMPRODUCT(--(Sheet2!$A$2:$A$5=Sheet1!A6),--(Sheet2!$B$2:$B$5=Sheet1!$B$2),--(Sheet2!$D$2:$D$5>0))
B7=SUM(B3:B6)
C3=SUMPRODUCT(--(Sheet2!$A$2:$A$5=Sheet1!A3),--(Sheet2!$B$2:$B$5=Sheet1!$C$2),--(Sheet2!$D$2:$D$5>0))
C4=SUMPRODUCT(--(Sheet2!$A$2:$A$5=Sheet1!A4),--(Sheet2!$B$2:$B$5=Sheet1!$C$2),--(Sheet2!$D$2:$D$5>0))
C5=SUMPRODUCT(--(Sheet2!$A$2:$A$5=Sheet1!A5),--(Sheet2!$B$2:$B$5=Sheet1!$C$2),--(Sheet2!$D$2:$D$5>0))
C6=SUMPRODUCT(--(Sheet2!$A$2:$A$5=Sheet1!A6),--(Sheet2!$B$2:$B$5=Sheet1!$C$2),--(Sheet2!$D$2:$D$5>0))
C7=SUM(C3:C6)
D3=SUMPRODUCT(--(Sheet2!$A$2:$A$5=Sheet1!A3),--(Sheet2!$B$2:$B$5=Sheet1!$D$2),--(Sheet2!$D$2:$D$5>0))
D4=SUMPRODUCT(--(Sheet2!$A$2:$A$5=Sheet1!A4),--(Sheet2!$B$2:$B$5=Sheet1!$D$2),--(Sheet2!$D$2:$D$5>0))
D5=SUMPRODUCT(--(Sheet2!$A$2:$A$5=Sheet1!A5),--(Sheet2!$B$2:$B$5=Sheet1!$D$2),--(Sheet2!$D$2:$D$5>0))
D6=SUMPRODUCT(--(Sheet2!$A$2:$A$5=Sheet1!A6),--(Sheet2!$B$2:$B$5=Sheet1!$D$2),--(Sheet2!$D$2:$D$5>0))
D7=SUM(D3:D6)
E3=SUMPRODUCT(--(Sheet2!$A$2:$A$5=Sheet1!A3),--(Sheet2!$B$2:$B$5=Sheet1!$E$2),--(Sheet2!$D$2:$D$5>0))
E4=SUMPRODUCT(--(Sheet2!$A$2:$A$5=Sheet1!A4),--(Sheet2!$B$2:$B$5=Sheet1!$E$2),--(Sheet2!$D$2:$D$5>0))
E5=SUMPRODUCT(--(Sheet2!$A$2:$A$5=Sheet1!A5),--(Sheet2!$B$2:$B$5=Sheet1!$E$2),--(Sheet2!$D$2:$D$5>0))
E6=SUMPRODUCT(--(Sheet2!$A$2:$A$5=Sheet1!A6),--(Sheet2!$B$2:$B$5=Sheet1!$E$2),--(Sheet2!$D$2:$D$5>0))
E7=SUM(E3:E6)


Regards,

AP
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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