ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excel Time Sheet - Rounding To Quarter Hours (https://www.excelbanter.com/excel-worksheet-functions/51054-excel-time-sheet-rounding-quarter-hours.html)

C A

Excel Time Sheet - Rounding To Quarter Hours
 
I've got a daily time-tracking spreadsheet. The formula in A4 is:

=(A2<A1)+A2-A1+(A3<B2)+A3-B2

(A1 = Start Time, A2 = Lunch Begin, B2 = Lunch End, A3 = End Time, A4 =
Total Hours Worked)

Formatted as "[h]:mm"

The formula works great, but I need the total hours to be rounded to the
nearest quarter hour (.00, .25, .50, .75) Right now, if the total is 7 and a
half hours, it comes out as "7.30"

I've sent this question in previously and I believe the answer was to
multiply the total by a number (can't remember what it was), but I needed to
know how to fit that into the formula above properly and don't remember
getting a response from that question.

Hope that isn't too confusing.

Peo Sjoblom

Excel Time Sheet - Rounding To Quarter Hours
 
Multiply with 24

(your_formula)*24

to round to the nearest .25 (15 minutes in decimal form)

=ROUND(((your_formula)*24)/0.25,0)*0.25

format as general, with 10:21 as result it returns 10.25


--

Regards,

Peo Sjoblom



"C A" wrote in message
...
I've got a daily time-tracking spreadsheet. The formula in A4 is:

=(A2<A1)+A2-A1+(A3<B2)+A3-B2

(A1 = Start Time, A2 = Lunch Begin, B2 = Lunch End, A3 = End Time, A4 =
Total Hours Worked)

Formatted as "[h]:mm"

The formula works great, but I need the total hours to be rounded to the
nearest quarter hour (.00, .25, .50, .75) Right now, if the total is 7

and a
half hours, it comes out as "7.30"

I've sent this question in previously and I believe the answer was to
multiply the total by a number (can't remember what it was), but I needed

to
know how to fit that into the formula above properly and don't remember
getting a response from that question.

Hope that isn't too confusing.




C A

Excel Time Sheet - Rounding To Quarter Hours
 
EXCELLENT. Thank you!

"Peo Sjoblom" wrote:

Multiply with 24

(your_formula)*24

to round to the nearest .25 (15 minutes in decimal form)

=ROUND(((your_formula)*24)/0.25,0)*0.25

format as general, with 10:21 as result it returns 10.25


--

Regards,

Peo Sjoblom



"C A" wrote in message
...
I've got a daily time-tracking spreadsheet. The formula in A4 is:

=(A2<A1)+A2-A1+(A3<B2)+A3-B2

(A1 = Start Time, A2 = Lunch Begin, B2 = Lunch End, A3 = End Time, A4 =
Total Hours Worked)

Formatted as "[h]:mm"

The formula works great, but I need the total hours to be rounded to the
nearest quarter hour (.00, .25, .50, .75) Right now, if the total is 7

and a
half hours, it comes out as "7.30"

I've sent this question in previously and I believe the answer was to
multiply the total by a number (can't remember what it was), but I needed

to
know how to fit that into the formula above properly and don't remember
getting a response from that question.

Hope that isn't too confusing.






All times are GMT +1. The time now is 02:03 PM.

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