Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Michaelcip Michaelcip is offline
external usenet poster
 
Posts: 2
Default Calculate cells for a timesheet

I'm trying to use Word to acct. for employee's daily/weekly worktime via a
timesheet that they can fill out. They will put their In-time (8:00am), then
Out-time (12:00pm) (lunch), then back In-time (from lunch) & finally
Out-time. It needs a Daily total & the Weeks total - my attempts have
thusfar been disasterous. I've scoured the internet for a form that gets me
close, but no luck. Thanks in advance for those attempting to help me here,
Michael
  #2   Report Post  
Posted to microsoft.public.word.tables
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Calculate cells for a timesheet

Hi Michael,

Word really isn't designed for this - it may be a powerful word processor, but an Excel-like spreadsheet it isn't. I'd recommend
using Excel - it'll be far easier to set up and maintain.

--
Cheers
macropod
[MVP - Microsoft Word]


"Michaelcip" wrote in message ...
I'm trying to use Word to acct. for employee's daily/weekly worktime via a
timesheet that they can fill out. They will put their In-time (8:00am), then
Out-time (12:00pm) (lunch), then back In-time (from lunch) & finally
Out-time. It needs a Daily total & the Weeks total - my attempts have
thusfar been disasterous. I've scoured the internet for a form that gets me
close, but no luck. Thanks in advance for those attempting to help me here,
Michael


  #3   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Calculate cells for a timesheet

If the data is being entered into formfields as are used in a protected
document, the following code will calculate the elapsed time between the
information entered into two formfields

' a Macro to calculate the elapsed time for formfields with Date format of
HH:mm
' Macro created 16 May 1999 by Doug Robbins - Word MVP
'
Start = ActiveDocument.FormFields("Text1").Result
StartHour = Val(Left(Start, 2))
StartMinutes = Val(Right(Start, 2))
StartTimeMinutes = StartHour * 60 + StartMinutes
Finish = ActiveDocument.FormFields("Text2").Result
FinishHour = Val(Left(Finish, 2))
FinishMinutes = Val(Right(Finish, 2))
FinishTimeMinutes = FinishHour * 60 + FinishMinutes
ElapsedMinutes = FinishTimeMinutes - StartTimeMinutes
ElapsedHours = Int(ElapsedMinutes / 60)
ElapsedMinutes = ElapsedMinutes - ElapsedHours * 60
ActiveDocument.FormFields("Text3").Result = Str(ElapsedHours) & ":" &
Format(ElapsedMinutes, "00")

With a bit of ingenuity, you could modify it so that it could be used from
the second of each pair of formfields (the out field) to do what you want,
but, as macropod indicates, it would probably be simpler to use an Excel
spreadsheet.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Michaelcip" wrote in message
...
I'm trying to use Word to acct. for employee's daily/weekly worktime via a
timesheet that they can fill out. They will put their In-time (8:00am),
then
Out-time (12:00pm) (lunch), then back In-time (from lunch) & finally
Out-time. It needs a Daily total & the Weeks total - my attempts have
thusfar been disasterous. I've scoured the internet for a form that gets
me
close, but no luck. Thanks in advance for those attempting to help me
here,
Michael



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i set up a weekly multi-employee timesheet? Brum Geoff Microsoft Word Help 2 January 4th 08 04:51 PM
White Lines / Empty Spaces above/below cells next to cells with bo Gowgirl4 Tables 1 October 9th 07 06:38 PM
Resize Word table cells without moving/resizing the other cells? hoozieg Tables 2 October 4th 07 11:15 PM
In word, how do I calculate cells in a table? Bettina Microsoft Word Help 1 July 3rd 07 06:03 AM
MS Word: select cells range and duplicate same data in all cells clarice Microsoft Word Help 0 June 1st 06 04:19 AM


All times are GMT +1. The time now is 03:36 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"