Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 12th, 2005, 09:25 PM
Registered User
Join Date: May 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Excel problem


I am making a work shift schedule for my company that is pretty basic. It has the employee names and then under the appropriate day it shows what shift they are working(ie. Monday 8-5). The problem I have is I would like to have excel somehow know that when I put "8-5" in a cell under a day that it means 8 hours paid(8-5, 9 hours minus 1 hour lunch). I have it so each employee has a "total hours" worked cell that adds up the hours each employee has worked for the week, but obviously it can't add up "8-5" because it doesn't know what that means. Is there any way to do what I want?

Reply With Quote
  #2 (permalink)  
Old May 13th, 2005, 01:36 PM
Friend of Wrox
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts

Of course, the easiest way is to use "hours since midnight" (24-hour time). Enter 8-17.

Best, however, is to have separate cells for start time and quit time, and put true dates and times there. This allows you to do date-time math, and covers shifts which cross midnight (graveyard shift, for instance).
Reply With Quote
  #3 (permalink)  
Old May 14th, 2005, 07:19 PM
Registered User
Join Date: May 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts


Ok, I figured out how to put time in using "time in", "time out" columns and have it so it will total hours for the week and minus 1 hour for unpaid break for each day[ex.(b1-a1-1/24)+(d1-c1-1/24)+...). The problem I have now is if I don't enter a time in, time out for a particular day(say Tuesday), it still takes off one hour for an unpaid lunch for Tuesday. I need every day to minus 1 hour as each employee works all different days. I know there is conditional formatting but I don't know how to use it.

If anyone has an idea on how to fix this problem I would be greatful.


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in opening excel file in MS Excel 2000 kallol Visual C++ 0 November 16th, 2007 05:48 AM
excel problem muralinagasuri Classic ASP Databases 0 August 22nd, 2006 10:47 AM
Excel Problem Brendan Bartley Access 1 July 7th, 2006 11:16 AM
Excel Increment Problem JimCognac Excel VBA 1 February 20th, 2004 11:52 AM
Excel in win 2000 to excel winxp (excel 2002) Max Excel VBA 3 August 28th, 2003 04:44 AM

All times are GMT -4. The time now is 06:52 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.