Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-14-2016, 08:10 PM
jiaron_1230 jiaron_1230 is offline How to set the table cells as time format? Windows 10 How to set the table cells as time format? Office 2016
Novice
How to set the table cells as time format?
 
Join Date: Nov 2016
Posts: 2
jiaron_1230 is on a distinguished road
Default 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?
Attached Files
File Type: docm test.docm (40.8 KB, 10 views)
Reply With Quote
  #2  
Old 11-14-2016, 11:07 PM
gmayor's Avatar
gmayor gmayor is offline How to set the table cells as time format? Windows 10 How to set the table cells as time format? Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,103
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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.
Attached Files
File Type: docm test.docm (46.9 KB, 7 views)
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 11-15-2016, 12:12 AM
jiaron_1230 jiaron_1230 is offline How to set the table cells as time format? Windows 10 How to set the table cells as time format? Office 2016
Novice
How to set the table cells as time format?
 
Join Date: Nov 2016
Posts: 2
jiaron_1230 is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
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.
i opened your document, but that's not what i look for.
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?
Reply With Quote
  #4  
Old 11-15-2016, 05:15 AM
gmayor's Avatar
gmayor gmayor is offline How to set the table cells as time format? Windows 10 How to set the table cells as time format? Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,103
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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.
Attached Files
File Type: docm test.docm (50.2 KB, 11 views)
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set the table cells as time format? a code to add altering time to cells tesoke Excel Programming 3 12-17-2015 12:31 PM
How to set the table cells as time format? Format Painter doesn't work on Table Format? Joey Cheung Word Tables 1 08-20-2014 02:24 AM
How to set the table cells as time format? How-TO format cells (FILL) by comparing cells zanat0s Excel 1 07-03-2012 04:27 AM
How to set the table cells as time format? how to gave comments to multiple cells at a time gsrikanth Excel Programming 14 02-08-2012 04:53 AM
How to set the table cells as time format? How to get cells to calculate time? jrasche2003@yahoo.com Excel 2 02-09-2007 07:10 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:46 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft