IF statement

P

Phil Wagner

I'm trying to assign an "IF" statement into a cell that references cells
that are formatted in Time with a displayed value as a whole number:

See the following example:

Data in cell B2 is formatted so the input text 01:00 is displayed as 1
Data in cell B3 is formatted so the input text 02:00 is displayed as 2
Data in cell B4 is formatted so the input text 03:00 is displayed as 3
....
and so on.

I want to input a formula in cell H3 that tells me if the value of B3=B2+1.
But since the values are input at a time value (i.e.: 01:00) and formatted
as h displayed as a whole number the statement IF(B3=B2+1,"","hour skipped")
doesn't work.

Is there a way to get the IF statement to recognize the data in column B?

TIA
 
S

Sandy Mann

One Hour is 1/24th of a day so use:

=IF(B3=B2+1/24,"","hour skipped")

But don't you have the formula the wrong way round? Surelt it should be:

=IF(B3=B2+1/24,"hour skipped","")

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top