tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,139
- Office Version
-
- 365
- 2019
- 2016
- Platform
-
- Windows
Hi everyone,
I think I need a macro because of the size of the document a Formula minght be able to do this but would not run well on such a large sheet.
So that out the way heres the problem
<tbody>
</tbody>
Ok so in this example QRS are wrong but as you can imagine it could be any of them,
this is quite complex so I'll plan it out the best I can
the sheet hold a Time sheet filled out each day by one person,
the sheet is set to work on the 24 hour clock.
Sometime when filling out the sheet they will put start and end times both as 12 hour clock so I get an error of minus like start 9.00 end 5.00 =-4.00
I've tried several way to stop this error but its still happening.
what I'd like is this:
When a end time is entered if the Hours = a minus figure then give me a message box asking me if I meant the 24 hour end time with a yes no if yes insert 24 hour time if no leave as is
so example from above table, when I typed into cell R2 2.00 it would see the result is -7 so message box pops up and says "Did you mean to type 14.00 ?" yes /no
size of range
the sheet is calendared for over 2 years so it would be hard to tell it what cells to look at for this as a trigger but the "hours" Columns start at "P" and are every third column and the "End" start at "O"
rows are 11 to 300
I realise this is complex and if there is a better way to do it let me know.
but I really need this sorted out so please help if you can
Tony
I think I need a macro because of the size of the document a Formula minght be able to do this but would not run well on such a large sheet.
So that out the way heres the problem
N | O | P | Q | R | S | T | U | V | |
1 | Start | End | Hours | Start | End | Hours | Start | End | Hours |
2 | 9.00 | 11.00 | 2 | 9.00 | 2.00 | -7 | 9.00 | 14.00 | 5 |
<tbody>
</tbody>
Ok so in this example QRS are wrong but as you can imagine it could be any of them,
this is quite complex so I'll plan it out the best I can
the sheet hold a Time sheet filled out each day by one person,
the sheet is set to work on the 24 hour clock.
Sometime when filling out the sheet they will put start and end times both as 12 hour clock so I get an error of minus like start 9.00 end 5.00 =-4.00
I've tried several way to stop this error but its still happening.
what I'd like is this:
When a end time is entered if the Hours = a minus figure then give me a message box asking me if I meant the 24 hour end time with a yes no if yes insert 24 hour time if no leave as is
so example from above table, when I typed into cell R2 2.00 it would see the result is -7 so message box pops up and says "Did you mean to type 14.00 ?" yes /no
size of range
the sheet is calendared for over 2 years so it would be hard to tell it what cells to look at for this as a trigger but the "hours" Columns start at "P" and are every third column and the "End" start at "O"
rows are 11 to 300
I realise this is complex and if there is a better way to do it let me know.
but I really need this sorted out so please help if you can
Tony