#Value Error with COUNTIF Formula

SFCChase

Board Regular
Joined
Jun 25, 2013
Messages
118
Office Version
  1. 2016
Platform
  1. Windows
Evidently my brain isn't working today.....

I'm using the formula =IF(D7="","",(COUNTIF(I7:Q7,">="&TODAY()))))/COUNTA(I5:Q5) to result a % of trainings that have not expired as of today.

As long as D7 has a name and I7:Q7 has a date, the formula works fine, but whenever D7 is blank I'm getting a #VALUE error and can't figure out why.

Column D is Text
Cells I5:Q5 are also Text
Cells I7:Q7 are dates
Formula will result a %

Any suggestions are greatly appreciated!
 
What do these formulas return?

=LEN(D7)
=COUNTA(I5:Q5)
 
Upvote 0
Try it like this
Excel Formula:
=IF(D7="","",COUNTIF(I7:Q7,">="&TODAY())/COUNTA(I5:Q5))
 
Upvote 0
Try it like this
Excel Formula:
=IF(D7="","",COUNTIF(I7:Q7,">="&TODAY())/COUNTA(I5:Q5))
Ah yes, I didn't notice that the division was outside of the IF statement, so you were literally trying to divide an empty string by a number.
The placement of those parentheses is important!
 
Upvote 0

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