Find Time VBA

zyhin

Board Regular
Joined
Oct 8, 2009
Messages
78
Hi all,

This has had me stumped for days and can no longer go without help.

I have a start time in column E and a finish time in column F and the total worked time in G. They log in every job and the times record and work out for each job. However due to our work break laws I have to do this a certain way. I ask them if they took there break in a msgbox (yes/no) when they finish for the day. If they answer no it uses i option button userform to give them other otpions. If they hit yes, I need it to change start time and finish time so that they finish the job at 11:00 and return on the same job a 11:30.

Eg.

9:32-9:52
9:52 - 11:56
11:56-12:02

the change it to

9:32-9:52
9:52 - 11:00
11:30-11:56
11:56-12:02

Due to red tape we have to show that they took their break at that time and that they have said they did. Hope someone can help as My mouse in my head is out of steam...lol

Z
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
It would be a big help if you post your userform vba code.

Pasting VBA code in the forum editor:
Surround your VBA code with code tags e.g [CODE]your VBA code here[/CODE]
When you're in the forum editor, highlight your pasted VBA code and then click on the icon with the pound or number sign #.
 
Upvote 0

Forum statistics

Threads
1,224,537
Messages
6,179,405
Members
452,911
Latest member
a_barila

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