Calculate time between start and finish minus the lunch break

paulalex93

New Member
Joined
Nov 10, 2023
Messages
8
Office Version
  1. 365
Platform
  1. MacOS
Hello, I am trying to figure out a way to calculate the time between start and finish for shifts, I managed to do that but I need one where from those hours it subtract automatically 30 minutes. Right now I am using =TEXT(<CELL1> - <CELL2>, "h:mm").
Can someone help me please.
For e.g the hours are all starting with 07:30 and ending in different times, like 18:00 - but for this hours it returns 10:30 and I need to subtract automatically the 30 minutes break.
Thank you!
 
one example is this: cell1 has: 07:30 and cell 2 has 18:00 - which returns 10 hours but as 10:00 from that formula and I would need just 10. The first formula with =hour works in this case but if I have let's say 07:30 and 17:30 it should return 9.5.
Try This.

Your Cell 1 should be the end time and Cell2 the start time.

=((<End> - <Start>)*24)-((TIME(0,30,0)*1440)/60)

Need help writing script for reporting.xlsm
DEFGHI
1Example 1Example 2Example 3Example 4Example 5
2Start7:308:008:309:009:30
3End18:0018:4519:3020:1521:00
4Break00:3000:3000:3000:3000:30
5Duration10.5010.7511.0011.2511.50
6Duration Minus Break10.0010.2510.5010.7511.00
Sheet1
Cell Formulas
RangeFormula
F2:I2F2=E2+TIME(0,30,0)
F3:I3F3=E3+TIME(0,45,0)
E5:I5E5=(E$3-E$2)*24
E6:I6E6=((E$3-E$2)*24)-((E4*1440)/60)
 
Upvote 0

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Try This.

Your Cell 1 should be the end time and Cell2 the start time.

=((<End> - <Start>)*24)-((TIME(0,30,0)*1440)/60)

Need help writing script for reporting.xlsm
DEFGHI
1Example 1Example 2Example 3Example 4Example 5
2Start7:308:008:309:009:30
3End18:0018:4519:3020:1521:00
4Break00:3000:3000:3000:3000:30
5Duration10.5010.7511.0011.2511.50
6Duration Minus Break10.0010.2510.5010.7511.00
Sheet1
Cell Formulas
RangeFormula
F2:I2F2=E2+TIME(0,30,0)
F3:I3F3=E3+TIME(0,45,0)
E5:I5E5=(E$3-E$2)*24
E6:I6E6=((E$3-E$2)*24)-((E4*1440)/60)
=((<End> - <Start>)*24)-((TIME(0,30,0)*1440)/60) - this does not work. Is there a way to make it without having the column or row for break time. It is the same for every one, meaning 30 minutes and we do not include it in our datas. I am sorry to keep stressing out about this but I have been wrecking my brains searching for the past days in order to have that generated automatically because I already have to manually input the start and end time and I would love for the hours to be automated. I have to do this for hundreds of people daily.
 
Upvote 0
=((<End> - <Start>)*24)-((TIME(0,30,0)*1440)/60) - this does not work. Is there a way to make it without having the column or row for break time. It is the same for every one, meaning 30 minutes and we do not include it in our datas. I am sorry to keep stressing out about this but I have been wrecking my brains searching for the past days in order to have that generated automatically because I already have to manually input the start and end time and I would love for the hours to be automated. I have to do this for hundreds of people daily.
Can you please use XL2BB to submit a mini sheet of your data?

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Can you please use XL2BB to submit a mini sheet of your data?

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.

Can you please use XL2BB to submit a mini sheet of your data?

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
mrexcel.xlsx
BCDEFGHI
1NAMEROLECLOCK INCLOCK OUTHOURS NOTES sum NOTES
27:3018:0010:00 <- here I need the hours as a number here I will make a formula which looks like this: =F2*32.5 because I need the hours multiplied by that sum
37:3018:0010:00
sheet 1
Cell Formulas
RangeFormula
F2:F3F2=TEXT(E2-D2 - TIME(0,30,0),"h:mm")
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,976
Members
449,095
Latest member
Mr Hughes

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