Comma Separator for Elapsed Hours [h]

RobertN

New Member
Joined
Jan 10, 2020
Messages
27
Office Version
  1. 365
Platform
  1. Windows
  2. Web
I am summing elapsed hours that total more than 24, so I am using [h]. Those that total more than one thousand hours, display without a comma separator. Is there a way to format these to use the comma separator?
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Possibly with a formula converting it to a text string in another cell, but not by formatting the original time value.

Something like =TEXT(INT(A1*24),"#,#")&TEXT(MOD(A1,1),"\:mm:ss") where A1 contains the time to format.
 
Upvote 0
Possibly with a formula converting it to a text string in another cell, but not by formatting the original time value.

Something like =TEXT(INT(A1*24),"#,#")&TEXT(MOD(A1,1),"\:mm:ss") where A1 contains the time to format.

Thank you, Jason. I forgot to mention that I already have a formula in these fields [=SUMIFS(TimeSheet_1[Hours],TimeSheet_1[Date],"<>",TimeSheet_1[Date],">=2/1/2020",TimeSheet_1[Date],"<$D$4")]. I am trying to come up with a custom formatting sequence that might add the comma separator or is there a way to stack these formulas?
 
Upvote 0
This should do it

=TEXT(INT(SUMIFS(TimeSheet_1[Hours],TimeSheet_1[Date],"<>",TimeSheet_1[Date],">=2/1/2020",TimeSheet_1[Date],"<$D$4") *24),"#,#")&TEXT(MOD(SUMIFS(TimeSheet_1[Hours],TimeSheet_1[Date],"<>",TimeSheet_1[Date],">=2/1/2020",TimeSheet_1[Date],"<$D$4") ,1),"\:mm:ss")

Note that using this will mean that the result of the formula is no longer a valid time format, so any other formulas, charts, pivot tables, etc. that refer to the result of this formula will no longer work.
 
Upvote 0
This should do it

=TEXT(INT(SUMIFS(TimeSheet_1[Hours],TimeSheet_1[Date],"<>",TimeSheet_1[Date],">=2/1/2020",TimeSheet_1[Date],"<$D$4") *24),"#,#")&TEXT(MOD(SUMIFS(TimeSheet_1[Hours],TimeSheet_1[Date],"<>",TimeSheet_1[Date],">=2/1/2020",TimeSheet_1[Date],"<$D$4") ,1),"\:mm:ss")

Note that using this will mean that the result of the formula is no longer a valid time format, so any other formulas, charts, pivot tables, etc. that refer to the result of this formula will no longer work.

You're a genius, Jason. Thanks so much!
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,605
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top