+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Multiple If Statment

  1. #1
    Registered User
    Join Date
    10-06-2010
    Location
    Dunstable,England
    MS-Off Ver
    Excel 2010
    Posts
    95

    Multiple If Statment

    Hi

    I'm trying to write a formula that brakes the times below down to 15 minute intervals.

    I was hoping someone would be able to help. I guess I need to use multiple of statments but not sure how to do it.

    Can anyone help please?

    This is what i have so far.

    =IF($H$2>$Y$1,0,1)

    H I
    Start Time End Time
    00:15 14:15
    08:00 20:30
    07:45 09:15
    13:00 20:00
    11:30 19:45

    The table I want to populate looks like this.

    Y Z AA AB
    00:00 00:15 00:30 00:45

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Multiple If Statment

    If the start/end never cross midnight then it's a simple case of:

    Please Login or Register  to view this content.
    where Y1:DP1 contain the 15 minute stamps and H2:I6 the start/end times

    If the times do cross midnight how do you wish to record them in your 1/0 matrix ?

    For ex. presume Start 20:00 and End of 06:00 ... do you want to record the 20:00 to 23:45 at the right end of your matrix or just 0:00 to 06:00 from the left ?

  3. #3
    Registered User
    Join Date
    10-06-2010
    Location
    Dunstable,England
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: Multiple If Statment

    Thanks. Problem solved. The user cant input values that cross over midnight.

  4. #4
    Registered User
    Join Date
    10-06-2010
    Location
    Dunstable,England
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: Multiple If Statment

    Hi. After using the tool for a few weeks the user has decided that the times must be able to cross midnight. For example if the Start is 20:00 and End of 06:00 ... I would want to record the 20:00 to 23:45 at the right end of your matrix and 00:00 to 06:00 from the left.

    Would anyone know how to achieve this?

    my formula so far is

    =($M2<=Q$1)*($N2>=Q$1)

    M= start time
    N= Finish time
    Q= Time header in the matrix

    many thanks

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Multiple If Statment

    Quite a few approaches to this type of thing - below is one which should account for either or scenario

    Please Login or Register  to view this content.

+ 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