View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Number of dates falling in a date range

I have Zero display switched off, and with that, this is returning no
value.


Turn it back on (at least temporarily) and see if the formula returns 0. If
it does then I suspect that your dates are not true Excel dates.

The example dates you posted are not true Excel dates.

Start Date: 1st Jan, 2009
End Date: 10th Jan, 2009
Exception Dates:
4th Jan
8th Jan
12th Jan



--
Biff
Microsoft Excel MVP


"Cralis" wrote in message
...
Thanks Biff,

I'm not getting the correct result.

This is what I have tried, based on your assistance.

=COUNTIF( 'Public Holidays'!$B$4:$B$400,"="&B5)-COUNTIF( 'Public
Holidays'!$B$4:$B$400,""&C5)

The holidays are in a column on 'Public Holidays' spreadsheet.

The cell (for this row) that has the start date is B5, with C5 holding
the End Date.
I have Zero display switched off, and with that, this is returning no
value. Have I done something wrong?