+ Reply to Thread
Results 1 to 6 of 6

Finding MAX value (TRICKY!)

Hybrid View

  1. #1
    Registered User
    Join Date
    05-18-2012
    Location
    London
    MS-Off Ver
    2013
    Posts
    14

    Finding MAX value (TRICKY!)

    Hello,
    I have been searching for this problem for the past 2 days and have had no luck! I was hoping if someone here knew the answer.

    I have a 2 columns. Columns A is 1 to 24 which loops till Row 8760 (It's the number of hours in 365 days). Column B is the internal temperature in my space.

    Is there a way to find the max value in Column B BUT only for values which have Column A values in the range of 1-9 and 21-24 (peak night temperature) without creating new columns?

    Regards,
    Pushkin

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: Finding MAX value (TRICKY!)

    sounds like somthing you could do with an array formula could you upload a book?
    .
    The Importance of INDEX - A GUIDE TO INDEX'S OTHER USES
    <--- If a post helps hit the star

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,040

    Re: Finding MAX value (TRICKY!)

    try this:

    =MAX(IF(ABS(15-A1:A10000)>5, B1:B10000))

    comfirmed with ctrl+shift+enter (not just enter)
    Last edited by zbor; 05-18-2012 at 04:53 AM. Reason: Changed range from 1000 to 10000
    Never use Merged Cells in Excel

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,414

    Re: Finding MAX value (TRICKY!)

    Put this array* formula in C1 (for example):

    =MAX(IF(((A1:A8760<=9)+(A1:A8760>=21)),B1:B8760))

    The + in this situation is equivalent to OR.

    *An array formula must be committed using the key combination Ctrl-Shift-Enter (CSE) rather than the usual <Enter>. If you do this correctly then Excel will wrap curly braces { } around the formula when viewed in the formula bar, but you should not type these yourself. If you need to amend the formula subsequently, you need to use CSE again.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    05-18-2012
    Location
    London
    MS-Off Ver
    2013
    Posts
    14

    Re: Finding MAX value (TRICKY!)

    Hello guys! Both answers worked perfectly! Really appreciate your help. Thanks!

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,414

    Re: Finding MAX value (TRICKY!)

    So, it wasn't all that tricky !! <bg>

    Thanks for feeding back.

    Pete

+ 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