COUNTIF formula

enthral

New Member
Joined
Mar 21, 2019
Messages
2
Good morning,

I've been given a task at work and am having a little bit of trouble with copying a countif formula.

The formula starts off as =COUNTIF($D$2:$D$885,"31/03/2017")

When I copy the formula I want the date associated with the formula to increase by one day each time. So the next forumla would be =COUNTIF($D$2:$D$885,"01/04/2017"), =COUNTIF($D$2:$D$885,"02/04/2017") etc etc.

Is it possible to do this?

Many thanks
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi, you could try like this:

=COUNTIF($D$2:$D$885,DATE(2017,4,ROWS(A$1:A1)-1))

For robustness change the A1 references in red to refer to the same cell where you first enter the formula before copying down.
 
Upvote 0
Welcome to the forum.

Why don't you put the dates into an adjacent column (which you can fill down) and then refer to that in the COUNTIF formula? It will make it much more obvious what each row is doing.
 
Last edited:
Upvote 0
Copying it where? Downwards?

Try

=COUNTIF($D$2:$D$885,DATEVALUE("31/03/2017")+(ROWS($1:1)-1))

This assumes your dates are actual dates and not text
 
Upvote 0
Thank you so much for giving me a hand. All of your solutions worked, and I have decided to use Special's formula.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,623
Latest member
Techenthusiast

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