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:
Location
Quarter - Website A
Quarter - Website B
Website A
Website B
Portland, OR
Q1
Q2
1/1/13
4/6/13
Yakima, WA
Q2
Q2
5/16/13
5/16/13
Springfield, ME
Q1
Q3
1/16/13
6/25/13
New York, NY
Q4
Q3
7/26/13
6/4/13

<tbody>
</tbody>

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

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
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:
Website A
Website B
Website C
Q1
Q2
Q3
Q4
Q1
Q2
Q3
Q4
Q1
Q2
Q3
Q4
Portland, OR
Yakima, WA
Springfield, ME
New York, NY

<tbody>
</tbody>
 
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,215,700
Messages
6,126,285
Members
449,308
Latest member
VerifiedBleachersAttendee

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