๐Ÿ”’ Closed Duration formula

Status
Not open for further replies.

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..
 
Status
Not open for further replies.

About this Thread

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

Trending Topics

Online now

Members online
1,021
Guests online
4,012
Total visitors
5,033

Forum statistics

Threads
2,353,259
Posts
29,378,900
Members
1,080,948
Latest member
Yasai09
Back
Top