ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   CountIf to determine Date - 3 yrs (https://www.excelbanter.com/excel-discussion-misc-queries/211152-countif-determine-date-3-yrs.html)

Brent E

CountIf to determine Date - 3 yrs
 
Good day,

I have a series of data including a date col. What is the criteria statement
I should use in the CountIf formula to determine the no. of records where the
date is 3 years or more prior to the current date in cell B2?

Pseudo criteria something like:
CountIf(DataRangeB:B, <= B2 - 3 yrs)

Thanks in advance,

Wigi

CountIf to determine Date - 3 yrs
 
=CountIf(DataRangeB:B,"<=" & DATE(YEAR(TODAY())-3;MONTH(TODAY());DAY(TODAY())))


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"Brent E" wrote:

Good day,

I have a series of data including a date col. What is the criteria statement
I should use in the CountIf formula to determine the no. of records where the
date is 3 years or more prior to the current date in cell B2?

Pseudo criteria something like:
CountIf(DataRangeB:B, <= B2 - 3 yrs)

Thanks in advance,


Shane Devenshire[_2_]

CountIf to determine Date - 3 yrs
 
Hi,

Here is a relatively short formula:

=COUNTIF(A1:A11,"<="&EDATE(D1,-36))

-36 means 36 months into the past. This assumes your dates are in A1:A11.

To use it choose Tools, Add-ins, and make sure the Analysis ToolPak has a
check beside it.

If this help, please click the Yes button.

Cheers,
Shane Devenshire

"Brent E" wrote:

Good day,

I have a series of data including a date col. What is the criteria statement
I should use in the CountIf formula to determine the no. of records where the
date is 3 years or more prior to the current date in cell B2?

Pseudo criteria something like:
CountIf(DataRangeB:B, <= B2 - 3 yrs)

Thanks in advance,


Chris Lavender

CountIf to determine Date - 3 yrs
 
Hi Brent

=COUNTIF(DataRangeB:B,"<="&TODAY()-1095)
or
=COUNTIF(DataRangeB:B,"<="&B2-1095)

Best rgds
Chris Lav

"Brent E" wrote in message
...
Good day,

I have a series of data including a date col. What is the criteria
statement
I should use in the CountIf formula to determine the no. of records where
the
date is 3 years or more prior to the current date in cell B2?

Pseudo criteria something like:
CountIf(DataRangeB:B, <= B2 - 3 yrs)

Thanks in advance,




All times are GMT +1. The time now is 07:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com