Forum Discussion
Jennifer Clark
Apr 23, 2018Copper Contributor
If Statement returns NOW() Function
I need the formula that will allow me to say If Cell X isnot blank then return now() for true or "Not Checked out" for false. =IF(B2 <> "","Date","Not Checked Out") I can't figure out how to...
- Mar 13, 2024
Angus239
hello,
Assuming that your Start(A2) and End(B2) has included a dateyou can use these following formulas to achieve your goal:
Total Hours
=ABS(24*((MIN(TIME(6,0,0),MOD(B2-TIME(18,0,0),1))-MIN(TIME(6,0,0),MOD(A2-TIME(18,0,0),1)))+(MAX(TIME(6,0,0),MOD(B2-TIME(18,0,0),1))-MAX(TIME(6,0,0),MOD(A2-TIME(18,0,0),1)))))
Day Shift Hours
=IF(B2>=$J$2,HOUR(B2)-6+MINUTE(B2)/60,0)
Night Shift Hours
=F2-D2
OVERVIEW:
I've attached a sample file for you
Haytham Amairah
Apr 23, 2018Silver Contributor
Hi Jennifer,
Simply, replace this:
=IF(B2 <> "","Date","Not Checked Out")
With this:
=IF(B2 <> "",NOW(),"Not Checked Out")
Or this:
=IF(B2 <> "",TODAY(),"Not Checked Out")
- MR_CFLSep 19, 2022Copper Contributorthanks a lot.
- Jennifer ClarkApr 23, 2018Copper Contributor
Awesome, thanks so much.