COUNTIF counting non existent item

HSEQ

New Member
Joined
Aug 23, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I have a UDF I use in a number of workbooks that returns either "", "File exists." or "File doesn't exist." entered into cells R19:R94 and then have the formula =COUNTIF(R19:R94,"File doesn't exist."). Everything works fine in most workbooks except for one workbook where the COUNTTIF returns 1 more than the number of occurrences of "File doesn't exist.". When the count should be zero, but is 1, I have tried searching for the string, using conditional formatting but the string is not found. COUNTIFS also returns one more.

I have run out of ideas, any thoughts appreciated.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Perhaps in that workbook you have a hidden row between row 18 and row 95 that contains "File doesn't exist."
If that's not the case, can you post the UDF, and a sample of the data that produces the unexpected result of 1 using XL2BB?
XL2BB - Excel Range to BBCode
 
Upvote 0
Solution
Found a hidden row I didnt realise existed, rooky error. Many thanks for the assistance!
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,928
Members
449,094
Latest member
teemeren

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