#1
|
|||
|
|||
How to set the table cells as time format?
in the column "from" and "to", is let the user to key in their working time, format as 24hr
after that, in std, n/std, n/std2, each of it hv different time area std= 0800 - 1700 n/std=1701-2400 n/std2=2401-0759 i would like to do is calculate the hours that user had work. Example, from to std n/std n/std2 0900 0200 8 7 2 Can anyone help me with this? |
#2
|
||||
|
||||
It's not that simple but the attached should give you a start point, though I haven't tested it thoroughly. The hours in the various segments are rounded up to the next hour. Then macro will run when you open the document. Personally I would save the document as a template, change the AutoOpen macro to AutoNew and create new documents from it as required.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
Quote:
there is 31 days in that table,user will key in the wokring hours at day 3 but not day 1 and 2. Is that got a way to do, like the user select the day 3, and key in the time, after that when the user hv work at day 6 or the other day, the user just select that day and thn key in the time, the hours will auto display? |
#4
|
||||
|
||||
You would need to add a combobox to the userform to select between 1 and 31 then instead of using the loop to enter the values, use the number (with two added) to give you the row to fill. Thus you can fill any row.
I have modified the document to do that. I have annotated the code so you can see how it works and make your own modifications.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
a code to add altering time to cells | tesoke | Excel Programming | 3 | 12-17-2015 12:31 PM |
Format Painter doesn't work on Table Format? | Joey Cheung | Word Tables | 1 | 08-20-2014 02:24 AM |
How-TO format cells (FILL) by comparing cells | zanat0s | Excel | 1 | 07-03-2012 04:27 AM |
how to gave comments to multiple cells at a time | gsrikanth | Excel Programming | 14 | 02-08-2012 04:53 AM |
How to get cells to calculate time? | jrasche2003@yahoo.com | Excel | 2 | 02-09-2007 07:10 AM |