+ Reply to Thread
Results 1 to 8 of 8

How to select largest value for each date?

  1. #1
    Registered User
    Join Date
    05-01-2009
    Location
    DC
    MS-Off Ver
    Excel 2003
    Posts
    8

    How to select largest value for each date?

    I have my data arranged in 4 columns as shown below (sample data). I need the Excel to find the largest value for each date and write them somewhere along with those dates. For example, the Excel should write in the 5th column (E) below two dates and values based on the sample data I listed below -

    4/1/2007 - 0.044
    4/2/2007 - 0.055

    I have about 17-18 values for each date between 4/1/2007 and 10/31/2007.

    Thanks.

    Sample Data
    ========================================
    A B C D
    --------- ---------- ---- -----
    Date SITE POC Concentration
    4/1/2007 110010025 1 0.039
    4/1/2007 110010041 1 0.042
    4/1/2007 110010043 1 0.039
    4/1/2007 240090011 1 0.042
    4/1/2007 240170010 1 0.044
    4/2/2007 110010025 1 0.051
    4/2/2007 110010041 1 0.048
    4/2/2007 110010043 1 0.052
    4/2/2007 240090011 1 0.053
    4/2/2007 240170010 1 0.055
    4/2/2007 240210037 1 0.055
    Last edited by sunil68; 05-11-2009 at 03:55 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: How to select largest value for each date?

    Use a Pivot Table.... see attached....

    tutorial:
    http://peltiertech.com/Excel/Pivots/pivotstart.htm
    Attached Files Attached Files
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    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 select largest value for each date?

    use this array formula confirmed with ctrl+shift+enter
    =MAX(($A$1:$A$5000=F1)*($D$1:$D$5000))
    so it then looks like this
    {=MAX(($A$1:$A$5000=F1)*($D$1:$D$5000))}
    where column f is your list of single dates
    "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

  4. #4
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,062

    Re: How to select largest value for each date?

    Another way to automatic list all different date and values.
    See attached.

    HTH,
    windknife
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-01-2009
    Location
    DC
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: How to select largest value for each date?

    Quote Originally Posted by NBVC View Post
    Use a Pivot Table.... see attached....

    tutorial:
    http://peltiertech.com/Excel/Pivots/pivotstart.htm
    Thanks a bunch. It helped a lot.

  6. #6
    Registered User
    Join Date
    05-01-2009
    Location
    DC
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: How to select largest value for each date?

    Quote Originally Posted by martindwilson View Post
    use this array formula confirmed with ctrl+shift+enter
    =MAX(($A$1:$A$5000=F1)*($D$1:$D$5000))
    so it then looks like this
    {=MAX(($A$1:$A$5000=F1)*($D$1:$D$5000))}
    where column f is your list of single dates
    It did not work for me. Could you pl. explain it further.

  7. #7
    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 select largest value for each date?

    attached example with max if array
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    05-01-2009
    Location
    DC
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: How to select largest value for each date?

    Quote Originally Posted by martindwilson View Post
    attached example with max if array
    Thanks a lot. It was really easy and great.

+ 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