Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 12th, 2005, 09:25 PM
Registered User
 
Join Date: May 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Excel problem

Hello,

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?

Thanks,
Matt
 
Old May 13th, 2005, 01:36 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

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).
 
Old May 14th, 2005, 07:19 PM
Registered User
 
Join Date: May 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

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.

Thanks,
Matt






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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.