ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   convert units (https://www.excelbanter.com/excel-discussion-misc-queries/72802-convert-units.html)

luiss

convert units
 
Hello,

I am trying to convert a number of hours to the format "days;hours". I do
not a precision higher then hour - i.e., do not need fractions of hour. E.g.
50 would appear as "2days;02hours", "50,6" as "2days, 3hours". What should I
do? I tried the "Convert" function, but did not manage to find the solution.

Thanks and regards,

Luis Serpa


Gary''s Student

convert units
 
try:
=INT(A1/24) & " days " & A1-INT(A1/24)*24 & " hr"
--
Gary''s Student


"luiss" wrote:

Hello,

I am trying to convert a number of hours to the format "days;hours". I do
not a precision higher then hour - i.e., do not need fractions of hour. E.g.
50 would appear as "2days;02hours", "50,6" as "2days, 3hours". What should I
do? I tried the "Convert" function, but did not manage to find the solution.

Thanks and regards,

Luis Serpa


daddylonglegs

convert units
 

Try this formula

=INT(ROUND(A8,0)/24)&" days, "&MOD(ROUND(A8,0),24)&" hours"


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=514541


luiss

convert units
 
Many thanks!



"daddylonglegs" wrote:


Try this formula

=INT(ROUND(A8,0)/24)&" days, "&MOD(ROUND(A8,0),24)&" hours"


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=514541



luiss

convert units
 
many Thanks!

"Gary''s Student" wrote:

try:
=INT(A1/24) & " days " & A1-INT(A1/24)*24 & " hr"
--
Gary''s Student


"luiss" wrote:

Hello,

I am trying to convert a number of hours to the format "days;hours". I do
not a precision higher then hour - i.e., do not need fractions of hour. E.g.
50 would appear as "2days;02hours", "50,6" as "2days, 3hours". What should I
do? I tried the "Convert" function, but did not manage to find the solution.

Thanks and regards,

Luis Serpa



All times are GMT +1. The time now is 09:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com