Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Microsoft Excel Formula "IF" to create a timesheet

I used the following formula to create a timehseet. I work from 8:30 to 4:30
with an hour paid lunch from 11:30 to 12:30. This formula only gives me 7
hours. How can I change the formula to give me 8 hours?
=IF((((D13-C13)+(F13-E13))*24)8,8,((D13-C13)+(F13-E13))*24)
--
reagolly
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default Microsoft Excel Formula "IF" to create a timesheet

First you need to tell us what's in d13, c13, e13 and f13.

Regards,
Fred.

"reagolly" wrote in message
...
I used the following formula to create a timehseet. I work from 8:30 to
4:30
with an hour paid lunch from 11:30 to 12:30. This formula only gives me 7
hours. How can I change the formula to give me 8 hours?
=IF((((D13-C13)+(F13-E13))*24)8,8,((D13-C13)+(F13-E13))*24)
--
reagolly


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default Microsoft Excel Formula "IF" to create a timesheet

Being as your luch is paid time don't subtract it:

=IF((F13-C13)*248,8,(F13-C13)*24)

or perhaps:

=MIN((F13-C13)*24,8)

Although you may want to prevent the result showing until data is entered:

=IF(COUNT(C13:F13)<4,"",IF((13-C13)*248,8,(F13-C13)*24))

or:

=IF(COUNT(C13:F13)<4,"",MIN((F13-C13)*24,8))

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"reagolly" wrote in message
...
I used the following formula to create a timehseet. I work from 8:30 to
4:30
with an hour paid lunch from 11:30 to 12:30. This formula only gives me 7
hours. How can I change the formula to give me 8 hours?
=IF((((D13-C13)+(F13-E13))*24)8,8,((D13-C13)+(F13-E13))*24)
--
reagolly



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Microsoft Excel Formula "IF" to create a timesheet

You can simplify your existing formula by changing
=IF((((D13-C13)+(F13-E13))*24)8,8,((D13-C13)+(F13-E13))*24) to
=MIN(8,((D13-C13)+(F13-E13))*24)

The reason that you've got 7 hours instead of 8 is that you've not given
credit for the hour at lunch, which you say is paid. In the simplest form,
you can just delete the content of D13 and E13 (or otherwise just add 1 to
the second term in the MIN expression), but you may instead wish to define
how to treat the data if the lunch break is longer than, or shorter than, 1
hour.

If you want to subtract time for any excess of the lunch break beyond 1
hour, you may want =MIN(8,((F13-C13)-MAX(E13-D13-1/24,0))*24)
--
David Biddulph

"reagolly" wrote in message
...
I used the following formula to create a timehseet. I work from 8:30 to
4:30
with an hour paid lunch from 11:30 to 12:30. This formula only gives me 7
hours. How can I change the formula to give me 8 hours?
=IF((((D13-C13)+(F13-E13))*24)8,8,((D13-C13)+(F13-E13))*24)
--
reagolly



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
How to create a scatter chart with 2 "X" values with common "Y"s M_LeDuc Charts and Charting in Excel 2 September 13th 07 10:26 PM
cannot use "Create List" and "Share Workbook" same time Devendra Excel Discussion (Misc queries) 0 October 26th 06 06:05 AM
create links to check boxes marked "good" fair"and "bad" pjb Excel Worksheet Functions 3 April 20th 06 02:17 AM
how to create the formula "cumsum" in excel paulc59 Excel Worksheet Functions 5 November 26th 05 02:58 AM


All times are GMT +1. The time now is 11:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"