Countifs formula between 2 date ranges is giving me a zero.

Tsteven4

New Member
Joined
Aug 17, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
=COUNTIFS($G$5:$K$134;">11/30/2020";$G$5:$K$134;"<1/1/2021")
Why is this formula giving a zero.

18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2125-Jan-214-Feb-2123-Mar-2129-Mar-21
18-Jan-2125-Jan-214-Feb-2123-Mar-2129-Mar-21
3-Dec-201-Jan-2122-Jan-2119-Apr-2110-Jun-21
11-Nov-204-Dec-2022-Feb-2118-Mar-2110-Jun-21
18-Dec-208-Mar-218-Mar-212-Apr-2114-Apr-21
2-Dec-2013-Jan-213-Feb-2117-Mar-2128-Apr-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
5-Jul-2014-Jul-2015-Jul-2010-Aug-20
10-Jul-2016-Jul-2017-Jul-2012-Aug-20
10-Nov-2020-Nov-2010-Dec-2020-Jan-21
20-Nov-201-Dec-2010-Dec-2020-Jan-21
20-Nov-201-Dec-2010-Dec-2020-Jan-21
20-Nov-201-Dec-2010-Dec-2020-Jan-21
20-Nov-201-Dec-2010-Dec-2020-Jan-21
20-Nov-201-Dec-2010-Dec-2020-Jan-21
20-Nov-201-Dec-2010-Dec-2020-Jan-21
20-Nov-201-Dec-2010-Dec-2030-Jan-21
10-Dec-2020-Dec-205-Jan-2130-Jan-21
10-Dec-2020-Dec-205-Jan-2130-Jan-21
10-Dec-2020-Dec-205-Jan-2130-Jan-21
10-Dec-2020-Dec-205-Jan-2130-Jan-21
10-Nov-2020-Nov-2010-Dec-2020-Jan-21
18-Jan-2125-Jan-214-Feb-2123-Mar-2129-Mar-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Dec-208-Mar-218-Mar-212-Apr-2114-Apr-21
2-Dec-2013-Jan-213-Feb-2117-Mar-2128-Apr-21
10-Nov-2020-Nov-2010-Dec-2020-Jan-21
10-Nov-2020-Nov-2010-Dec-2020-Jan-21
10-Nov-2020-Nov-2010-Dec-2020-Jan-21
10-Nov-2020-Nov-2010-Dec-2020-Jan-21
10-Nov-2020-Nov-2010-Dec-2020-Jan-21
10-Nov-2020-Nov-2010-Dec-2020-Jan-21
10-Nov-2020-Nov-2010-Dec-2020-Jan-21
10-Nov-2020-Nov-2010-Dec-2020-Jan-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
15-Oct-2115-Nov-2110-Dec-21
15-Oct-2115-Nov-2110-Dec-21
15-Oct-2115-Nov-2110-Dec-21
15-Oct-2115-Nov-2110-Dec-21
15-Oct-2115-Nov-2110-Dec-21
15-Oct-2115-Nov-2110-Dec-21
15-Oct-2115-Nov-2110-Dec-21
15-Oct-2115-Nov-2110-Dec-21
15-Oct-2115-Nov-2110-Dec-21
15-Oct-2115-Nov-2110-Dec-21
15-Oct-2115-Nov-2110-Dec-21
15-Oct-2115-Nov-2110-Dec-21
15-Oct-2115-Nov-2110-Dec-21
15-Oct-2115-Nov-2110-Dec-21
15-Oct-2115-Nov-2110-Dec-21
15-Oct-2115-Nov-2110-Dec-21
15-Oct-2115-Nov-2110-Dec-21
15-Oct-2115-Nov-2110-Dec-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
18-Jan-2121-Feb-2115-Mar-216-Apr-219-Aug-21
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Do your regional settings expect dates to be a "dd/mm/yyyy" format?

=COUNTIFS($G$5:$K$134;">30/11/2020";$G$5:$K$134;"<1/1/2021")

Or you could try a unambiguous format of.

=COUNTIFS($G$5:$K$134;">2020-11-30";$G$5:$K$134;"<2021-01-01")

Or you could try using the date formula.

=COUNTIFS($G$5:$K$134;">" & Date(2020,11,30);$G$5:$K$134;"<" & date(2021,1,1))
 
Upvote 0
Try

=COUNTIFS($G$5:$K$134;">"&DATEVALUE("11/30/2020");$G$5:$K$134;"<"&DATEVALUE("01/01/2021")
 
Upvote 0
are they actual dates in the cells or text
right click on a date
Format cells
Change to General and see if the date format changes to show just a number
dates are usually right justified and text is left, so looks like TEXT to me

44270 is the 15th March 21
 
Upvote 0
This is the sample spreadsheet.
are they actual dates in the cells or text
right click on a date
Format cells
Change to General and see if the date format changes to show just a number
dates are usually right justified and text is left, so looks like TEXT to me

44270 is the 15th March 21
They are actual dates. Just the format of the cell is made to show the date in that way.
 
Upvote 0
It seems the dates are texts, not real dates (numbers).
If so try
=SUMPRODUCT(--(--$G$5:$K$134>DATE(2020,11,30)),--(--$G$5:$K$134<DATE(2021,1,1)))

M.
 
Upvote 0
I have sorted out the problem, it was with the format of the date. Changed it in the formula to YYYYMMDD. Problem resolved.
Thanks all
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,897
Members
449,097
Latest member
dbomb1414

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