MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Mar 20th, 2002, 12:27 PM   #1
AKAtude98
New Member
 
Join Date: Mar 2002
Posts: 2
Default

I am trying to create an automated timesheet in Excel. Basically, an employee should be able to enter his/her time in and time out, and Excel will calculate the total hours the employee works, how much leave time they have (anything over 7 hrs is leave time), it will know that a person is not scheduled to work on Saturdays and Sundays, and it makes sure that everyone works 7 hrs, even if the person must put in leave time. The problem that I am having is calculating the total hrs worked for the day. If someone works from 10am-6pm, I know how to make Excel show 8 hrs. But, what if they come in at 10:15am and leave at 6pm; what if they come in at 1:00pm and leave at 6pm; what if they come in at 4pm and leave at 12:00 midnight; what if they come in at 12 in the afternoon and leave at 6 pm; what if they come in at 12 in the afternoon and leave at 2:00 am; what if they come in at 3:00pm and leave at 2:00am??? I am having trouble creating if statements that consider all these cases. If anyone can help me, I would greatly appreciate it.
AKAtude98 is offline   Reply With Quote
Old Mar 20th, 2002, 12:56 PM   #2
Jack in the UK
Board Regular
 
Join Date: Feb 2002
Posts: 3,065
Default

Hi --

You have not askeda question as such, more many quiestions, poss people wont aswer all them, its kinda of a project.

OK i have timesheet that the guru of timesheets, i designed and another i stole, well was sent, both are very touchy twitchy and frawt with issues. so expert maintance is always required as any timesheet will.

check the web for such TEMPLATES or examples, i know no way to avoid VBA scripts and that bring BIG problems as its al time convertions ie base 60.

So guru Gurus (one i think of Chris before you say) could do this in formula but it a project and a half..

I give without question anythink i have away to use view whatever, but i dont really want to they are not very good in returning results, like sick and holidays all sorts.

Fix,, build VERY slowly, manula input and replace bit by bit and so wuill cover what you need, your then understand the codes and formulas so will be able to maintain.. just there is what you want might not do the trick.

ME! i would post a question a day if needs be and getthat help you need.. and i would love the challange.. im know for fact single questions GET RESULTS from readers and i know you get that help.

Good luck.

IF YOU REALLY REALLY must.. i can send you codes and sheets, but i do not recoment taking that offer, they can be difficult, but i do not want to say no or hide the facts. Just being honest a lot to be said for that.


__________________
Free Excel based Web Toolbar available here.

Jack in the UK
J & R Excel Solutions
"making Excel work for you"
Jack in the UK is offline   Reply With Quote
Old Mar 20th, 2002, 12:56 PM   #3
Al Chara
MrExcel MVP
 
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
Default

Try the following procedure:

If you put 10:15:00 AM in cell A1 and 6:00:00 PM in cell B1, then to calculate the total amount of hours worked you would enter =(D1-C10)*24 in cell C1. Does this answer your question?
__________________
Kind regards,

Al Chara
Al Chara is offline   Reply With Quote
Old Mar 20th, 2002, 01:08 PM   #4
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
Default

Hi AKAtude98:
Suppose you have the person IN in cell A1, and the person OUT in cell B1, then the formula for hours worked in cell C1 would be
=(B1-A1)*24
Now please keep in mind that Excel considers 1 whole day as unit number 1, and the 24 hours make up day 1. So you have to format cells A1 and B1 as DATE/TIME, and C1 as NUMBER ... General. Following is a small sample of times IN and OUT entered and HrsWorked calculated according to the formula above

In Out Hrs Worked
10:30 AM 6:15 PM 7.75
3/19/02 14:00 3/20/02 3:00 13
3/19/02 10:30 3/19/02 18:15 7.75

HTH

__________________
Regards!

Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
www.energyefficientbuild.com
Yogi Anand is offline   Reply With Quote
Old Mar 20th, 2002, 01:19 PM   #5
AKAtude98
New Member
 
Join Date: Mar 2002
Posts: 2
Default

That equation has solved 99.9% of my problems!!!! I appreciate the help....I was starting to get a headache looking at this thing.
AKAtude98 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
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 On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 02:18 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes