WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Calculate cells for a timesheet

 
   Home -> Office -> Tables RSS
Next:  EXCELL SPREADSHEETS IN WORD  
Author Message
Michaelcip

External


Since: Aug 22, 2007
Posts: 3



(Msg. 1) Posted: Fri Jul 18, 2008 6:43 pm
Post subject: Calculate cells for a timesheet
Archived from groups: microsoft>public>word>tables (more info?)

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
Back to top
Login to vote
macropod

External


Since: Jul 02, 2008
Posts: 684



(Msg. 2) Posted: Sat Jul 19, 2008 6:33 pm
Post subject: Re: Calculate cells for a timesheet [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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" <Michaelcip RemoveThis @discussions.microsoft.com> wrote in message news:0B3BDA67-52CB-447C-A2AE-8D7C1EA0AD32@microsoft.com...
> 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
Back to top
Login to vote
Doug Robbins - Word MVP

External


Since: Jul 14, 2006
Posts: 4208



(Msg. 3) Posted: Sat Jul 19, 2008 6:59 pm
Post subject: Re: Calculate cells for a timesheet [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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" <Michaelcip.TakeThisOut@discussions.microsoft.com> wrote in message
news:0B3BDA67-52CB-447C-A2AE-8D7C1EA0AD32@microsoft.com...
> 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
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Tables All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET