Forum Discussion

erin-5304's avatar
erin-5304
Copper Contributor
Dec 01, 2022

Formula for calculating time

I am working on a formula for the following:

 

If K95=Yes and X95=No the find the time difference in hours of Q110 (time stopped) and AP104 (time started again).  These to cells are formatted like this:

16-Feb-2022 15:30

 

If X95=Yes then the it should be 0.

 

This is what I have so far but I think I am way off.

 

=IF(DataEntry!K95+”Yes”,0,(Round(IF(DataEntry!Q104>DataEntry!Q110,( DataEntry!Q110- DataEntry!AP104)*1440/60,(DataEntry!Q110-DataEntry!AP104)*1440/60),1)))

1 Reply

  • Patrick2788's avatar
    Patrick2788
    Silver Contributor

    erin-5304 

    Try this formula. You'll need to add sheet references if your formula and the cells you're referencing are on different sheets.

     

    =IF(X96="Yes",0,IF(AND(K95="Yes",X95="No"),ABS(HOUR(X110)-HOUR(AP104)),""))

     

Resources