Countif, including today's date, excluding future dates

valmir

Board Regular
Joined
Feb 10, 2021
Messages
235
Office Version
  1. 365
Platform
  1. Windows
Hello everyone
I'm using this formula:
=COUNTIF(D3:AG3;">"&DATE(1900;1;1))
And the reason I'm using this particular formula is that within the "D3:AG3" range, I have cells with formulas whose result is not a date and/or blank cells.
I understand that this formula will count only those cells with results as date.
Now I would like this formula to be modified so as to exclude any future date but to include today's date
Thanks a lot!
 
I3 is the future date:
Cell Formulas
RangeFormula
D2D2=INDIRECT($A3&"!$GK$5")
E2E2=INDIRECT($A3&"!$GK$6")
F2F2=INDIRECT($A3&"!$GK$7")
G2G2=INDIRECT($A3&"!$GK$8")
H2H2=INDIRECT($A3&"!$GK$9")
I2I2=INDIRECT($A3&"!$GK$10")
J2J2=INDIRECT($A3&"!$GK$11")
K2K2=INDIRECT($A3&"!$GK$12")
L2L2=INDIRECT($A3&"!$GK$13")
M2M2=INDIRECT($A3&"!$GK$14")
N2N2=INDIRECT($A3&"!$GK$15")
O2O2=INDIRECT($A3&"!$GK$16")
P2P2=INDIRECT($A3&"!$GK$17")
Q2Q2=INDIRECT($A3&"!$GK$18")
R2R2=INDIRECT($A3&"!$GK$19")
S2S2=INDIRECT($A3&"!$GK$20")
T2T2=INDIRECT($A3&"!$GK$21")
U2U2=INDIRECT($A3&"!$GK$22")
V2V2=INDIRECT($A3&"!$GK$23")
W2W2=INDIRECT($A3&"!$GK$24")
X2X2=INDIRECT($A3&"!$GK$25")
Y2Y2=INDIRECT($A3&"!$GK$26")
Z2Z2=INDIRECT($A3&"!$GK$27")
AA2AA2=INDIRECT($A3&"!$GK$28")
AB2AB2=INDIRECT($A3&"!$GK$29")
AC2AC2=INDIRECT($A3&"!$GK$30")
AD2AD2=INDIRECT($A3&"!$GK$31")
AE2AE2=INDIRECT($A3&"!$GK$32")
AF2AF2=INDIRECT($A3&"!$GK$33")
AG2AG2=INDIRECT($A3&"!$GK$34")
AI2AI2=COUNTIF(D3:AG3,">"&DATE(1900,1,1))
D3D3=INDIRECT($A3&"!$GI$5")
E3E3=INDIRECT($A3&"!$GI$6")
F3F3=INDIRECT($A3&"!$GI$7")
G3G3=INDIRECT($A3&"!$GI$8")
H3H3=INDIRECT($A3&"!$GI$9")
I3I3=INDIRECT($A3&"!$GI$10")
J3J3=INDIRECT($A3&"!$GI$11")
K3K3=INDIRECT($A3&"!$GI$12")
L3L3=INDIRECT($A3&"!$GI$13")
M3M3=INDIRECT($A3&"!$GI$14")
N3N3=INDIRECT($A3&"!$GI$15")
O3O3=INDIRECT($A3&"!$GI$16")
P3P3=INDIRECT($A3&"!$GI$17")
Q3Q3=INDIRECT($A3&"!$GI$18")
R3R3=INDIRECT($A3&"!$GI$19")
S3S3=INDIRECT($A3&"!$GI$20")
T3T3=INDIRECT($A3&"!$GI$21")
U3U3=INDIRECT($A3&"!$GI$22")
V3V3=INDIRECT($A3&"!$GI$23")
W3W3=INDIRECT($A3&"!$GI$24")
X3X3=INDIRECT($A3&"!$GI$25")
Y3Y3=INDIRECT($A3&"!$GI$26")
Z3Z3=INDIRECT($A3&"!$GI$27")
AA3AA3=INDIRECT($A3&"!$GI$28")
AB3AB3=INDIRECT($A3&"!$GI$29")
AC3AC3=INDIRECT($A3&"!$GI$30")
AD3AD3=INDIRECT($A3&"!$GI$31")
AE3AE3=INDIRECT($A3&"!$GI$32")
AF3AF3=INDIRECT($A3&"!$GI$33")
AG3AG3=INDIRECT($A3&"!$GI$34")
AH3AH3=COUNTIFS(D4:AG4,">0",D4:AG4,"<=1000")
AI3AI3=AH3-AI2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
AI3Cell Value<0textNO
B2:B46,D2:AI46Cell Value=0textNO
 
Upvote 0

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Thanks for that. What about this?
Excel Formula:
=COUNTIFS(D3:AG3,">0",D3:AG3,"<="&TODAY())
 
Upvote 0
Solution
You're welcome. Glad we got there in the end. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

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