+ Reply to Thread
Results 1 to 9 of 9

Need help with max formula!

  1. #1
    Registered User
    Join Date
    05-30-2017
    Location
    US
    MS-Off Ver
    2016
    Posts
    8

    Need help with max formula!

    Max.png



    I am currently running a timed experiment where I have a column of increasing times (column A) with a set of values (column C) recorded at those times. The software I am using generates 3-5 data points per second and I have ~50,000 rows I really (REALLY) want to sift through with a formula instead of manually. I would have to scroll through 100 pages to manually select a range

    Basically, I want to define a range of times using a upper/lower limit (column A), and obtain the max value of column C within that time range.

    ________
    e.g. at 14:04:59, a drug dose is given to measure a response that has a peak before the next dose is given at 14:15:11. I want to find that peak (i.e. max) value.

    So, between the times 14:04:59 and 14:15:11 (represented in column A), I want to find to find the max in column C within that reference range. 14:04:59 would define the lower limit and 14:15:11 would define the upper limit of that range in column A.


    Thanks in advance! First time poster here.
    Attached Files Attached Files
    Last edited by aupa; 05-30-2017 at 11:07 PM. Reason: clarification

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Need help with max formula!

    not sure how you are defining range of times
    sounds like you need to use max formula or some kind of combination of MAX/IF or even aggregate formula

    Attach a small sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    05-30-2017
    Location
    US
    MS-Off Ver
    2016
    Posts
    8

    Re: Need help with max formula!

    Updated my post. Thank you. I kept it simple and plugged in a desired max value for the times 12:50:15-12:50:16.

  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Need help with max formula!

    this is the formula i came up with
    it is an array formula
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    reason i added the MOD in there is because the time in column A has the date affixed to it as well
    so MOD(,1) just strips the date off and leaves the time

    D7 is lower and E7 is upper...i had the headings on backwards but you get the idea
    greater than and equal to D7 less than and equal to E7
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-30-2017
    Location
    US
    MS-Off Ver
    2016
    Posts
    8

    Re: Need help with max formula!

    Thank you so much for your reply and time spent doing this.

    For some reason, the formula doesn't seem to be dependent on the inputted times; the example I gave worked but try the same workbook again with the lower limit outside the range of the max value of B2:B25 (e.g. 12:50:16). The formula gives the max of the entire set of B2:B25, rather than the values limited by the =IF clause.

    When I tried it with my giant set of data, it provided the max number of the total data which was outside the time limitations I had set up.

    Again, thank you.

  6. #6
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Need help with max formula!

    sorry slight change in formula
    still CSE

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Need help with max formula!

    hmm this formula works perfectly when dealing with dates...it seems to be time that is messing it up
    ill ask others to see if they can chime in

  8. #8
    Registered User
    Join Date
    05-30-2017
    Location
    US
    MS-Off Ver
    2016
    Posts
    8

    Re: Need help with max formula!

    Works!!! Thank you so much. This will save me hours.

    Reputation coming your way.

  9. #9
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Need help with max formula!

    actually just change the upper and lower
    copy and paste the number you want to start and end with
    then change formula to not have MOD at all

    Formula: copy to clipboard
    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)

Similar Threads

  1. Excel formula bar to display the result of the formula , not the formula?
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2016, 07:15 PM
  2. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  3. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 PM

Tags for this Thread

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