Countif Problem

rmtimmah

Board Regular
Joined
May 14, 2007
Messages
153
Hi, I have a sheet that contains dates going back a few years. I am trying to use the countif function to count the different sites in column B according to date. eg I want to be able to find out how many jobs for PHO1 were created between todays date and 7 days ago, this can go into column C, In column D I need to find out how many jobs were created by PHO1 between 7 and 14 days ago etc etc.
Book2.xls
ABCD
126/07/2007PHO1
226/07/2007PHO1
326/07/2007ISA1
426/07/2007CC01
526/07/2007CC01
626/07/2007CC01
727/07/2007CC01
Sheet1
 
=SUMPRODUCT(--($B$1:$B$100 = "PHO1"),--($A$1:$A$100 >=today()-7),--($A$1:$A$100 <=today()-14))

How is this?
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
That didn't work because of the absolute values but I have managed to figure it out by using another cell with a value of =today()-14 and referencing the working formula to that.

Thanks anyway
 
Upvote 0
Watch the direction of the <..... That is probably why Excel Champion's formula is returning zeros......
 
Upvote 0

Forum statistics

Threads
1,215,061
Messages
6,122,921
Members
449,094
Latest member
teemeren

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