Forum Discussion
VanDerWallas
May 09, 2024Copper Contributor
Wildcard characters not working in COUNTIFS function
Hi y'all, this was a real brain scratcher for me, I gave up and went to the internet looking for answers. Here's my situation: I have two columns. Column 1 has names in it, Column 2 has dates (in t...
- May 09, 2024
This is because Excel stores dates as numbers not as text.
"30.04.2024" works because it is a complete date, but "*.04.2024" is not recognized as a date.
Also, the ranges are specified incorrectly.
Use this instead:
=COUNTIFS(A21:A500; "John Doe"; B21:B500; ">="&DATE(2024; 4; 1); B21:B500; "<="&DATE(2024; 4; 30))
HansVogelaar
MVP
This is because Excel stores dates as numbers not as text.
"30.04.2024" works because it is a complete date, but "*.04.2024" is not recognized as a date.
Also, the ranges are specified incorrectly.
Use this instead:
=COUNTIFS(A21:A500; "John Doe"; B21:B500; ">="&DATE(2024; 4; 1); B21:B500; "<="&DATE(2024; 4; 30))
VanDerWallas
May 09, 2024Copper Contributor
Hey, thanks for replying. I effed the ranges by copypasting here, in my doc the ranges are good.
Does it matter that these are dates? In my mind they are strings of characters and I thought that "*.04.2024" means I am looking for a string of characters ending with ".04.2024".
BTW I copy pasted your formula and it works like a charm, thanks again man!
Does it matter that these are dates? In my mind they are strings of characters and I thought that "*.04.2024" means I am looking for a string of characters ending with ".04.2024".
BTW I copy pasted your formula and it works like a charm, thanks again man!
- HansVogelaarMay 09, 2024MVP
Yes, it does matter that the values are dates. They work differently than text strings.