+ Reply to Thread
Results 1 to 10 of 10

Finding the next highest and lowest values

  1. #1
    Forum Contributor
    Join Date
    04-16-2020
    Location
    Alberta, Canada
    MS-Off Ver
    365
    Posts
    216

    Finding the next highest and lowest values

    i'm trying to find the value A in a table.. so i can ultimately find B based on temp and A. I'm not sure how to lookup based on two values, when one of the values (temp) repeats itself in a table.

    Eventually there will be multiple tables, not just the HA-1 table, but for now I need to figure out how to get 'B''... which means I need my A's. If there is a way to skip the A's and just get B, i'm all for that too. The High temp isn't working either.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Finding the next highest and lowest values

    Hi,
    You need the results in Column H?

  3. #3
    Forum Contributor
    Join Date
    04-16-2020
    Location
    Alberta, Canada
    MS-Off Ver
    365
    Posts
    216

    Re: Finding the next highest and lowest values

    the results are the 'hard coded' column

    column H are manually entered by me looking at the tables, I want column 'I' to be formulas to get the same results.
    Last edited by Cobra17; 06-09-2020 at 02:17 PM.

  4. #4
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Finding the next highest and lowest values

    H10 = =lookup(h6,$b$7:$b$62)

    H11 =index($c$1:$c$62,aggregate(15,6,row($c$7:$c$62)/($b$7:$b$62=h10),1))

    H12 =index($c$1:$c$62,aggregate(15,6,row($c$7:$c$62)/($b$7:$b$62=h10),2))

    H13 =index($d$1:$d62,aggregate(15,6,row($c$7:$c$62)/($b$7:$b$62=h10),1))

    H14 =index($d$1:$d62,aggregate(15,6,row($c$7:$c$62)/($b$7:$b$62=h10),2))
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    04-16-2020
    Location
    Alberta, Canada
    MS-Off Ver
    365
    Posts
    216

    Re: Finding the next highest and lowest values

    I copied the formula's over but ALowLow and ALowHigh don't change when A is changed, and the B's aren't working correct when you go into higher temps.

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,104

    Re: Finding the next highest and lowest values

    Do you have the dynamic array functions like FILTER?

  7. #7
    Forum Contributor
    Join Date
    04-16-2020
    Location
    Alberta, Canada
    MS-Off Ver
    365
    Posts
    216

    Re: Finding the next highest and lowest values

    I do have filter

    I did get it to work
    LowTemp = =INDEX(B7:B62,MATCH(H6,B7:B62,1)-1)
    ALowLow = =INDEX(C7:C62,MATCH(1,(I10=B7:B62)*(H7<=C7:C62),0)-1)
    ALowHigh = =INDEX(C7:C62,MATCH(1,(I10=B7:B62)*(H7<=C7:C62),0))
    BLowLow = =INDEX(D7:D62,MATCH(1,(I10=B7:B62)*(I11=C7:C62),0),0)
    BLowHigh =INDEX(D7:D62,MATCH(1,(I10=B7:B62)*(I12=C7:C62),0),0)

    then repeat for the high temps.


    I'm totally open to a shorter way if FILTER will do it.

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,104

    Re: Finding the next highest and lowest values

    How about
    I10
    =XLOOKUP(H6,B7:B62,B7:B62,"",-1)
    I11
    =XLOOKUP(H7,FILTER(C7:C62,B7:B62=I10),FILTER(C7:C62,B7:B62=I10),"",-1)
    I12
    =XLOOKUP(H7,FILTER(C7:C62,B7:B62=I10),FILTER(C7:C62,B7:B62=I10),"",1)
    I13
    =XLOOKUP(I11,FILTER(C7:C62,B7:B62=I10),FILTER(D7:D62,B7:B62=I10),"",1)
    I14
    =XLOOKUP(I12,FILTER(C7:C62,B7:B62=I10),FILTER(D7:D62,B7:B62=I10),"",1)

  9. #9
    Forum Contributor
    Join Date
    04-16-2020
    Location
    Alberta, Canada
    MS-Off Ver
    365
    Posts
    216

    Re: Finding the next highest and lowest values

    that worked too. never heard of a XLOOKUP.

    Now i need to work on having an indirect lookup to choose the correct table...lol

  10. #10
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,104

    Re: Finding the next highest and lowest values

    You're welcome & thanks for the feedback.

+ 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. [SOLVED] Finding lowest and Highest recorded times
    By chriswrcg in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-13-2019, 01:10 PM
  2. Need help finding top 5 highest/lowest records
    By kloob in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-29-2018, 01:07 AM
  3. [SOLVED] Finding highest/lowest values over a set date period
    By Terry-J in forum Excel General
    Replies: 5
    Last Post: 09-29-2016, 03:31 PM
  4. [SOLVED] finding the X highest (or lowest) numbers in a set.
    By jimboryan in forum Excel General
    Replies: 3
    Last Post: 07-25-2014, 02:20 AM
  5. [SOLVED] Finding the category with the highest/lowest score
    By Vemonstrocity in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-08-2012, 07:08 PM
  6. Finding the highest or lowest value
    By simonjg in forum Excel General
    Replies: 0
    Last Post: 09-18-2011, 10:39 AM
  7. Finding Highest values and Lowest Values
    By jpthelpguy in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-22-2009, 03:30 AM

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