❓ Help Duration formula

Trident_muh

Honorary Poster
Duration formula

I'm using google spreedsheet, I have here 3 column's. Column A row 1 header title is "time start". Column B row 1 header title "time end" and Column C row 1 "duration. Column C time format is "dd:hh:mm:ss"

can provide formula to use in Column C to compute the duration of Column A and B. but only if there is value in column B if there is none Column C will compute Column A and todays current time.
 
Solution
🤖
To calculate the duration between the time in Column A and Column B, taking into account the condition you mentioned, you can use the following formula in Column C:

=IF(B1<>"", B1-A1, NOW()-A1)

Here's how the formula works:

- IF(B1<>"": This checks if there is a value in Column B. If there is a value, it means there is an end time, so the formula will calculate the difference between the end time (B1) and the start time (A1).

- B1-A1: This calculates the duration between the start time and end time in Column B and A, respectively.

- NOW()-A1: If there is no value in Column B, the formula will calculate the duration between the start time (A1) and the current time using the NOW() function.

Make sure to format the cells in Column C...
To calculate the duration between the time in Column A and Column B, taking into account the condition you mentioned, you can use the following formula in Column C:

=IF(B1<>"", B1-A1, NOW()-A1)

Here's how the formula works:

- IF(B1<>"": This checks if there is a value in Column B. If there is a value, it means there is an end time, so the formula will calculate the difference between the end time (B1) and the start time (A1).

- B1-A1: This calculates the duration between the start time and end time in Column B and A, respectively.

- NOW()-A1: If there is no value in Column B, the formula will calculate the duration between the start time (A1) and the current time using the NOW() function.

Make sure to format the cells in Column C as "dd:hh:mm:ss" to display the duration correctly.
 
Solution
To calculate the duration between the time in Column A and Column B, taking into account the condition you mentioned, you can use the following formula in Column C:

=IF(B1<>"", B1-A1, NOW()-A1)

Here's how the formula works:

- IF(B1<>"": This checks if there is a value in Column B. If there is a value, it means there is an end time, so the formula will calculate the difference between the end time (B1) and the start time (A1).

- B1-A1: This calculates the duration between the start time and end time in Column B and A, respectively.

- NOW()-A1: If there is no value in Column B, the formula will calculate the duration between the start time (A1) and the current time using the NOW() function.

Make sure to format the cells in Column C as "dd:hh:mm:ss" to display the duration correctly.
Thank you..
 

About this Thread

  • 4
    Replies
  • 337
    Views
  • 2
    Participants
Last reply from:
Mariposa101

Trending Topics

Online now

Members online
983
Guests online
1,152
Total visitors
2,135

Forum statistics

Threads
2,273,853
Posts
28,952,081
Members
1,234,978
Latest member
panda1829
Back
Top