+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Time Formula

Hybrid View

AlanWade Time Formula 11-17-2008, 09:33 AM
darkyam No attachment, but formula... 11-17-2008, 06:11 PM
AlanWade thats fantastic! thankyou ... 11-18-2008, 04:25 AM
darkyam Try... 11-18-2008, 10:18 AM
AlanWade I couldnt get it work, I... 11-18-2008, 10:37 AM
AlanWade I just cant get the formula... 11-18-2008, 11:28 AM
  1. #1
    Registered User
    Join Date
    06-16-2008
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    72
    thats fantastic! thankyou

    One problem I found is if I arrive home before 16:00 it shows a negative value which in turn is deducted from the months total, can I have negative values show and caculated as 0?
    Now, at the risk of being cheeky (which I can assure you thats not what I want to be ) at the other end of the scale can I adapt this to if I drive before 07:30 but arrive after 07:30, it will only calculate up till 07:30.

    Is it possible to explain the formula in simple terms, I find it intresting but dont understand it.

    Thanks Again
    Alan
    Attached Files Attached Files
    Last edited by AlanWade; 11-18-2008 at 06:20 AM.

  2. #2
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191
    Try =IF(I1="","",MAX(0,MIN(39/48,I1)-MAX(2/3,H1)))
    Instead of fractions, you could use Time(19,30,0) for 7:30 and Time(16,0,0). I use fractions only because it's easy for me to think in terms of fractions and I like short formulas.
    An IF formula has three parts, the logical test, the value if true, and the value if false. If I1 is blank, this formula will return a blank, otherwise it will calculate the value. Max just takes the largest value in a given list. Putting Max(0,<rest of formula>) in makes it read as 0 if the value is negative. Min is simply the opposite.

  3. #3
    Registered User
    Join Date
    06-16-2008
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    72
    I couldnt get it work, I changed all the comma's to semi colons (I have excel in Swedish) but still it wouldnt work. Maybe, if you have time, you could look at the attachment and tell me where I am going wrong.

    Thanks for all your help
    Alan

    EDIT
    Forgot to change IF to OM
    That works great.

    Now with the morning journey, its reversed so that I count everthing before 07:30 but nothing after.
    Last edited by AlanWade; 11-18-2008 at 10:44 AM.

  4. #4
    Registered User
    Join Date
    06-16-2008
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    72
    I just cant get the formula in reverse
    This time I would like where a1 is the start time (Before 07:30) and B1 is the end time, as before but only calculated up till 07:30
    eg a1 = 07:00 and b1 = 07:35, it will give an answer of 30 mins But I just cant get it.
    Please can you help again.
    Alan

    EDIT

    GOT IT!

    Thanks darkyam for all your help.

    Regards
    Alan
    Last edited by AlanWade; 11-18-2008 at 11:37 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1