If formula

Fegal

Board Regular
Joined
Feb 2, 2013
Messages
101
Office Version
  1. 365
Platform
  1. Windows
Could somebody help me with formula in G20, is working as intended mostly but can make it not calculate when cell in D is empty.

TIA

Fatigue 1.xlsx
C
148/04/2024 20:33
Phase 1
Cell Formulas
RangeFormula
C14C14=+NOW()

Fatigue 1.xlsx
DEFGHI
205/04/2024 6:00y5/04/2024 17:0016:305/04/2024 23:00
215/04/2024 7:00y5/04/2024 17:0015:306/04/2024 0:00
225/04/2024 8:00y5/04/2024 17:0014:306/04/2024 1:00
235/04/2024 6:30y5/04/2024 17:0016:005/04/2024 23:30
245/04/2024 5:30y5/04/2024 17:0017:005/04/2024 22:30
255/04/2024 7:00y5/04/2024 17:0015:306/04/2024 0:00
265/04/2024 6:30y5/04/2024 17:0016:005/04/2024 23:30
275/04/2024 7:00y5/04/2024 17:0015:306/04/2024 0:00
285/04/2024 7:00n5/04/2024 17:0015:306/04/2024 0:00
295/04/2024 7:00y5/04/2024 17:0015:306/04/2024 0:00
305/04/2024 6:005/04/2024 17:0086:3356/04/2024 4:00
311089380:33 
321089380:33 
331089380:33 
341089380:33 
Phase 1
Cell Formulas
RangeFormula
G20:G34G20=IF(K20="",$C$14-D20,K20-D20)
I20:I30I20=IFERROR(IF(D20="","",D20+17/24)+H20/24,"")
I31:I34I31=IFERROR(IF(D31="","",D31+17/24)-H31/24,"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
I18:I50Cellcontains a blank value textNO
I18:I50Expression=NOW()-$D18>=TIME(17,0,0)textYES
I18:I50Expression=NOW()-$D18>=TIME(14,0,0)textYES
I18:I50Expression=NOW()-$D18<=TIME(14,0,0)textYES
E18:E34,E39:E76,E94:E126Cell Valuecontains "N"textNO
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Excel Formula:
=IF(ISBLANK(D20),"",IF(K20="",$C$14-D20,K20-D20))
 
Upvote 0
Solution

Forum statistics

Threads
1,224,820
Messages
6,181,157
Members
453,021
Latest member
Justyna P

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