+ Reply to Thread
Results 1 to 3 of 3

How to find the time that a max value occurs?

  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    How to find the time that a max value occurs?

    Hi,

    I have a spreadsheet that has data taken for every 10 minutes throughout the day for close to a year. Im having trouble trying to find the time that the max value occurs in my data for each day.
    Ive got a column with the times that the data is recorded, a column that has just the date (in number format), a column of the data and a column that finds the max value for that particular day using the following formula:

    =IF(B2<>B3,MAX(($B$2:$B$1048576=B2)*($C$2:$C$1048576)),"")

    Ive tried using the formula below to find the time of day, however there are a number of duplicates on different days in the data so it only returns the earliest date that it finds.

    =IF(B2<>B3,INDEX(A:A,(MATCH(E2,C:C,0))),"")

    Can anyone please help me with a formula to find the time the max value occurs each day. I have attached a spreadsheet that is similar to the one I'm working on which may help.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to find the time that a max value occurs?

    use a helper put this array formula in d2 fill down
    =IF(C2=MAX(IF($B$2:$B$2000=B2,$C$2:$C$2000,0)),ROW(),"")
    see here on how to enter arrays
    http://office.microsoft.com/en-us/ex...001087290.aspx
    then max flow in e2=IF(ROW(A1)>COUNT($D$2:$D$2000),"",INDEX($C$2:$C$2000,MATCH(SMALL($D$2:$D$2000,ROW(A1)),$D$2:$D$2000,0)))
    and date time in f2 =IF(ROW(a1)>COUNT($D$2:$D$2000),"",INDEX($A$2:$A$2000,MATCH(SMALL($D$2:$D$2000,ROW(a1)),$D$2:$D$2000,0))
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    08-07-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: How to find the time that a max value occurs?

    Thanks martindwilson.

    That helps alot and is greatly appreciated. Keep up the good work!

+ 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