View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MyVeryOwnSelf[_3_] MyVeryOwnSelf[_3_] is offline
external usenet poster
 
Posts: 56
Default Excel 2010 If Then logic - with time

I would like to use a time format as the logical
test and the statement does not seem to recognize
the time format. It converts it to some 1.XXXX
number.

Any suggestions?


If you're trying to test the value of a cell containing a time, remember that a time is really a number: a fraction of a day. For example, 0.5 is noon, or 12 hours (12:00) -- half a day. So compare times like numbers.

If you're trying to test if a cell is in the time format or not, take a look at the function
CELL(info_type, [reference])
with info_type="format".

(I have Excel 2010.)