Return days and hours

gailb
3StarLounger
Posts: 254
Joined: 09 May 2020, 14:00

Return days and hours

Post by gailb »

I would like to take a number and from that number calculate time in days and hours.

In an 8-hour day, a person will cover 20 miles.

So, for 20 miles, I'd like to show 1 days and 0.00 hours
For 25 miles - 1 days and 2.00 hours
For 30 miles - 1 days and 4.00 hours
For 40 miles - 2 days and 0.00 hours
For 125 miles - 6 days and 2.00 hours

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Return days and hours

Post by HansV »

With a distance in A1:

=QUOTIENT(A1,20)&" days and "&TEXT(MOD(A1/20,1)*8,"0.00")&" hours"
Best wishes,
Hans

gailb
3StarLounger
Posts: 254
Joined: 09 May 2020, 14:00

Re: Return days and hours

Post by gailb »

Thanks, this is perfect