Countif to count date getting #Error

%3CLINGO-SUB%20id%3D%22lingo-sub-1676975%22%20slang%3D%22en-US%22%3ECountif%20to%20count%20date%20getting%20%23Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1676975%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20count%20if%20a%20range%20of%20dates%20is%20greater%20or%20lesser%20than%20a%20particular%20date%20but%20facing%20Error.%20Please%20see%20the%20cell%20H11.%20You%20can%20check%20the%20formula%20in%20the%20formula%20bar.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20someone%20help%20to%20resolve%20it%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3CP%3ENishant%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1676975%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1677003%22%20slang%3D%22en-US%22%3ERe%3A%20Countif%20to%20count%20date%20getting%20%23Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1677003%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F796836%22%20target%3D%22_blank%22%3E%40Nishantu309034%3C%2FA%3E%26nbsp%3BTry%20it%20with%20a%20comma%20between%20D12%20and%20%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1677046%22%20slang%3D%22de-DE%22%3ESubject%3A%20Countif%20to%20count%20date%20getting%20%23Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1677046%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F796836%22%20target%3D%22_blank%22%3E%40Nishantu309034%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CH1%20id%3D%22toc-hId-530283027%22%20id%3D%22toc-hId-530282997%22%20id%3D%22toc-hId-530282997%22%20id%3D%22toc-hId-530282997%22%3E%3CFONT%20size%3D%224%22%3ECount%20numbers%20or%20dates%20based%20on%20a%20condition%3C%2FFONT%3E%3C%2FH1%3E%3CDIV%3E%3CDIV%20class%3D%22appliesTo%20collapsed%22%3E%3CFONT%20size%3D%222%22%3E%3CSPAN%20class%3D%22appliesToItem%22%3EExcel%20for%20Microsoft%20365%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22appliesToItem%22%3EExcel%202019%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22appliesToItem%22%3EExcel%202016%3C%2FSPAN%3E%20Excel%20%3CSPAN%20class%3D%22appliesToItem%22%3E2013%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22appliesToItem%22%3EExcel%202010%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22appliesToItem%22%3EExcel%202007%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%20class%3D%22appliesTo%20collapsed%22%3E%3CFONT%20size%3D%224%22%3E%3CSPAN%20class%3D%22appliesToItem%22%3E%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-gb%2Foffice%2Fcount-numbers-or-dates-based-on-a-condition-976d0074-245d-49e6-bf5f-1207983f82ed%3Fui%3Den-us%26amp%3Brs%3Den-gb%26amp%3Bad%3Dgb%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.microsoft.com%2Fen-gb%2Foffice%2Fcount-numbers-or-dates-based-on-a-condition-976d0074-245d-49e6-bf5f-1207983f82ed%3Fui%3Den-us%26amp%3Brs%3Den-gb%26amp%3Bad%3Dgb%3C%2FA%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%20class%3D%22appliesTo%20collapsed%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22appliesTo%20collapsed%22%3E%3CFONT%20size%3D%224%22%3E%3CSPAN%20class%3D%22appliesToItem%22%3EWith%20VBA%3A%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%20class%3D%22appliesTo%20collapsed%22%3E%3CPRE%3ESub%20datum()%0A%20%20%20Dim%20inZeile%20As%20Integer%0A%20%20%20inZeile%20%3D%20Application.Match(CDbl(Date)%2C%20Columns(1)%2C%201)%0A%20%20%20MsgBox%20Cells(inZeile%20%2B%201%2C%201).Address%0AEnd%20Sub%3C%2FPRE%3E%3CP%3EFormula%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EAs%20Mr%20Riny%20van%20Eekelen%20has%20also%20pointed%20out.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1677047%22%20slang%3D%22en-US%22%3ERe%3A%20Countif%20to%20count%20date%20getting%20%23Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1677047%22%20slang%3D%22en-US%22%3EAh!..%20Thanks%20a%20lot.%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hi, 

I am trying to count if a range of dates is greater or lesser than a particular date but facing Error. Please see the cell H11. You can check the formula in the formula bar. 

 

Can someone help to resolve it? 

 

Regards

Nishant 

4 Replies
Highlighted

@Nishantu309034 Try it with a comma between D12 and "

 

Highlighted

@Nishantu309034 

Count numbers or dates based on a condition

Highlighted
Ah!.. Thanks a lot.
Highlighted

@Nishantu309034 ,,

 

You have committed few basic mistakes.

 

  1. After the Count Range D11:D12,, COMMA is missing.
  2. Applied the operator is wrong sequence "=<",, must be "<=".

And the formula should like,,, 

 

=COUNTIF(D11:D12,"<="&$H$10)