Answer the question
In order to leave comments, you need to log in
How to calculate late time in Google Sheets?
Hello!
There is a table in which the time interval is specified.
I want to make an automatic calculation according to the conditions:
If the arrival time (E3) is less than the beginning of the interval, (A3) then we display the text "Arrived earlier by: E3-C3"
If the arrival time (E3) is greater than the beginning of the interval (A3) but less than the end (B3) , display the text "Arrived on time"
If the arrival time (E3) is higher than the end of the interval (B3), display the text "Late to: E3-B3"
Collected for this formula:
ifs(E3<A3;"Раньше";E3<B3;"Вовремя";E3>B3;"Опоздали")
Answer the question
In order to leave comments, you need to log in
=ЕСЛИ(E3 < A3;СЦЕПИТЬ("Пришёл раньше на ";ЕСЛИ(ОКРУГЛВНИЗ(((ЧАС(A3)*60+МИНУТЫ(A3)) - (ЧАС(E3)*60+МИНУТЫ(E3)))/60) > 0;СЦЕПИТЬ(ОКРУГЛВНИЗ(((ЧАС(A3)*60+МИНУТЫ(A3)) - (ЧАС(E3)*60+МИНУТЫ(E3)))/60);"ч.");"");" "; ОСТАТ((ЧАС(A3)*60+МИНУТЫ(A3)) - (ЧАС(E3)*60+МИНУТЫ(E3));60);" мин."); ЕСЛИ(E3 > B3;СЦЕПИТЬ("Опоздал на ";ЕСЛИ(ОКРУГЛВНИЗ(((ЧАС(E3)*60+МИНУТЫ(E3)) - (ЧАС(B3)*60+МИНУТЫ(B3)))/60) > 0;СЦЕПИТЬ(ОКРУГЛВНИЗ(((ЧАС(E3)*60+МИНУТЫ(E3)) - (ЧАС(B3)*60+МИНУТЫ(B3)))/60);"ч.");"");" "; ОСТАТ((ЧАС(E3)*60+МИНУТЫ(E3)) - (ЧАС(B3)*60+МИНУТЫ(B3));60);" мин.");"Прибыл вовремя"))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question