|re: In this context it would seem to be checking that C6-C8 are formatted as dates.|
Not so. From the VBA Help files:
The required expression argument is a Variant containing a date
expression or string expression recognizable as a date or time.
The format of the cell sort of has nothing to do with it. IsDate checks the actual contents of the cell regardless of how it is formatted.
However, formatting can not be completely ignored.
Format C6 as Number or General and enter 50000.
Your latest formula will return 50007 (or 11/28/36 if the formula cell is formatted as Date) even though 50000 isn't technically a date.
My UDF will return No Dates since 50000 can not recognized as a date.
Now, select C6, format it as Date and the next time the UDF calculates, it will return 50007 (or 11/28/36 if the UDF cell is formatted as Date)
So we really need to know what the OP is putting in those cells and if they will always be dates or if the format might change, etc.
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.