Correctly Write Formula For Time < 59 Minutes

docwoody

New Member
Joined
Sep 3, 2007
Messages
31
I have procedure start times in A1, end times in B1, and in C1 = the time calculated. I wrote a formula in D1 to enter "1" if the time is < 59 minutes. I used =IF(C1<TIME(0,59,0),1,""), but if C1 is blank it still returns as true. How can I still calculate in D1 that C1 is <59 minutes to return "1", but if the cell is blank to leave D1 blank? Help please.

Doc Woody
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi Doc Woody

How can C1 be blank if it contains a formula?
 
Upvote 0
Maybe:

Excel Formula:
=IF(AND(C1<>"",C1<TIME(0,59,0)),1,"")
 
Upvote 0
Hi Doc Woody

How can C1 be blank if it contains a formula?
C1 is the time calculated between A1 and B1. If nothing is entered into A1 and B1, C1 will be blank. I want D1 to return blank if C1 is blank, but if a time is entered, I only want D1 to show "1" if the time is <59 minutes.
 
Upvote 0
Maybe:

Excel Formula:
=IF(AND(C1<>"",C1<TIME(0,59,0)),1,"")
Thanks dreid1011, unfortunately it did the same as the other fu=ormulas I have tried. It still returns "1" when C1 is blank. I have to figureout how to tell excel that the value shold be between 0-59 I guess. Thanks again.
 
Upvote 0
If A1 and B1 are empty then the whole calucation is needless.
 
Upvote 0
How about
Excel Formula:
=IF(or(C1="",C1>=TIME(0,59,0)),"",1)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top