+ Reply to Thread
Results 1 to 5 of 5

Max Value Based on Conditions

  1. #1
    Registered User
    Join Date
    04-05-2007
    Location
    Lombard, Illinois
    Posts
    60

    Cool Max Value Based on Conditions

    Hi all,

    My next problem is finding the three highest values based on five conditions. The sumary data will be in one worksheet and the detail data in another.

    My data looks like this. Five columns of data, one row of data for every five minutes of a day. I want to find the three highest values in column E when columns A=Auto, B=dngitr30, C=In, and D=the date in cell A4, A5, A6, etc. I've been trying to use the LARGE worksheet function, but I either get an error or 0 as the result.

    Row column letters
    no (A) (B) (C) (D) (E)
    1 Auto dngitr30 In 3/1/08 12:03 AM 0.20
    2 Auto dngitr30 In 3/1/08 12:08 AM 0.49
    3 Auto dngitr30 In 3/1/08 12:13 AM 0.15
    4 Auto dngitr30 In 3/1/08 12:18 AM 0.08
    5 Auto dngitr30 In 3/1/08 12:23 AM 0.23
    6 Auto dngitr30 In 3/1/08 12:28 AM 0.22
    7 Auto dngitr30 In 3/1/08 12:33 AM 0.35
    8 Auto dngitr30 In 3/1/08 12:38 AM 0.38
    9 Auto dngitr30 In 3/1/08 12:43 AM 0.24
    10 Auto dngitr30 In 3/1/08 12:48 AM 0.49
    11 Auto dngitr30 In 3/1/08 12:53 AM 0.31
    12 Auto dngitr30 In 3/1/08 12:58 AM 0.19
    13 Auto dngitr30 In 3/1/08 1:03 AM 0.83
    14 Auto dngitr30 In 3/1/08 1:08 AM 0.34

    How can I test these four fields and find the three largest values in column E.

    Thanks for any help

  2. #2
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852
    Hi Gav,

    You can create a pivot table from your data (see attached).

    the "auto", "dngitr30" and the "in" are in the page section of the pivot.
    Your "date" and your "values" on the "Row" section of the pivot.
    The "Sum of value" (must be formated as numeric on the source sheet) in your data section.

    On the field configuration Under Top 10 AutoShow select 3 and sort the field descending.

    As new data is inserted you will see the totals change automatically. (New dates also). You just need to refresh the pivot. (click the button).
    Attached Files Attached Files
    If you found the solution to your question. Mark the thread as "Solved"
    Thank everyone that helped you with a valid solution by clicking on their

    There is no such thing as a problem, only a temporary lack of a solution

  3. #3
    Registered User
    Join Date
    04-05-2007
    Location
    Lombard, Illinois
    Posts
    60
    Thanks for the suggestion Portuga, but I'm not sure it would be worth converting. One because of my lack of Pivet table experience.

    Two because what I have is a spreadsheet where I collect 24 different measurements each day of the week. Up until now, I've added the information by reviewing daily graphs. Now I will be receiving the data in a CSV file each week. I'm trying to convert my columns to calculate the measurement from the CSV data, so I don't have to review the graphs. Then each month I select portions of the data (maybe the last 45 or 60 days) and create graphs for management.

    I have the formulas working that calculate a bunch of averages. I'm now stuck on getting the daily peak values. I believe the easier way for me would be with a cell formula.

  4. #4
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852
    Don´t be afraid of pivots, they are simple things!! The conversion you are talking will take you 15 minutes to do...and once its done, its done.

    When you add those 24 measurements (or 24000), the pivot (once refreshed) will automatically display the data. For your problem, the simplest of solutions.

    Some more info on pivots.
    http://www.contextures.com/xlPivot01.html#Dynamic

    P.R - Pivots Rule!

  5. #5
    Registered User
    Join Date
    04-05-2007
    Location
    Lombard, Illinois
    Posts
    60
    Thanks for the input Portuga.

    I still don't believe a pivot table is the best solution for this data. Here's why;

    1. I will have 35,712 rows of data for each month. I have over two years worth of summarized data right now. I will exceed the number of rows limit in Excel in two months. Then I'll have to add the data into different columns or different worksheets to continue using Pivot tables.
    2. I don't need dynamic data. My data is static once it is calculated and summarized.
    3. Each month I copy and paste the values and overlay the formulas in the cells, then delete the detail data. I'm just using the formulas to summarize the detail data the first time I add it in. The values will never change once calculated.
    4. If I did create the pivot table, I would have to copy and paste the results into a more permanent spreadsheet, because again I would eventually have to start deleting the rows of detail data. I need to keep at least 13 months of summarized data for graphind purposes.

    I would still like to find a way to get the MAX or LARGE functions to work with the four conditions. Can anyone help me out?

+ 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