Counting the number of items between two dates

ihmunro

Board Regular
Joined
Oct 11, 2002
Messages
74
Morning

I have been working with SUMPRODUCT which works well and I am not sure if this is what I need to use.

I am trying to identify the number of line items that have dates between today and 30 days, 30 - 90 days and > 90 days.

I am trying to do as a lookup.

Many thanks in advance.

Iain
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi Iain,

I'm not sure whether you are referring to dates 30-90 days in the future, or the past. Assuming the future, you could use the following to obtain your counts:

In an adjacent column use the formula

=IF(AND($B4>TODAY(),$B4<TODAY()+30),1,0)

to yield a 1 if the data is within 30 days of today, 0 otherwise. Then sum the column to get the number of days.

Similarly you can use formulas:

=IF(AND($B4>TODAY()+30,$B4<TODAY()+90),1,0)

and

=IF($B4>TODAY()+90,1,0)

to get counts of the dates 30-90 days in the future, and more than 90 days in the future, respectively.
 
Upvote 0
Hi again Ian,

For some reason I didn't get the complete formulas copied in my previous post for the first two formulas. They should have been:

=IF(AND($B4>TODAY(),$B4<TODAY()+30),1,0)

and

=IF(AND($B4>TODAY()+30,$B4<TODAY()+90),1,0)

Damon
 
Upvote 0
Damon's post with HTML diabled

On 2002-11-05 14:21, Damon Ostrander wrote:
Hi again Ian,

For some reason I didn't get the complete formulas copied in my previous post for the first two formulas. They should have been:

=IF(AND($B4>TODAY(),$B4<TODAY()+30),1,0)

and

=IF(AND($B4>TODAY()+30,$B4<TODAY()+90),1,0)

Damon
 
Upvote 0

Forum statistics

Threads
1,214,614
Messages
6,120,525
Members
448,969
Latest member
mirek8991

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