Thread: DATE PROBLEM
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default DATE PROBLEM

=IF(OR(ISBLANK(A1),ISBLANK(B1)),"",B1-A1) if you want the answer to be an
empty string.

If you are using the results in a graph, use
=IF(OR(ISBLANK(A1),ISBLANK(B1)),NA(),B1-A1) [and if you want to you can use
conditional formatting to hide the #N/A results on your sheet.]
--
David Biddulph

"Malcolm Austin" wrote in message
...
Hi,
I'm having trouble sorting a date issue on an Excel 2000 file,
where there are blanks.

I've got the data copied to a separate sheet and have Date 1 in the first
column and Date 2 beside that.
It was easy to take date 1 from 2 and get the number of days in-between
(for use in a countif function & graphing). My problem is that the main
data page has a lot of empty cells in it, and on copying this across it
comes out at 01/01/1900 on my data/graph page

How do I get Excel to ignore the blank cells?