+ Reply to Thread
Results 1 to 13 of 13

Value furthest from zero between cell range

  1. #1
    Registered User
    Join Date
    11-27-2013
    Location
    Reading
    MS-Off Ver
    Excel 2013
    Posts
    19

    Value furthest from zero between cell range

    Hi back again

    In the attached sheet I'm able to find the max and min value between the cell range, but I'm having trouble with finding the correct way to return the value furthest from zero.

    I'd like to be able to return the value furthest from zero in column Q to J42, within the times specified in A41 and A43.

    I'm using
    =MAX(IF((P$3:P$707>=A41)*(P$3:P$707<A43),Q$3:Q$707))

    and

    =MIN(IF((P$3:P$707>=A41)*(P$3:P$707<A43),Q$3:Q$707))

    for the max and min as positive and negative value.
    Book.xlsx

    Thanks in advance

    Pete
    Last edited by PeanutPete; 01-29-2014 at 12:17 PM.

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Value furthest from zero between cell range

    Hello pete try this in L42
    =MIN(IF((P$3:P$707>=A41)*(P$3:P$707<A43),IF(Q$3:Q$707>0,Q$3:Q$707))) array entered!
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  3. #3
    Registered User
    Join Date
    11-27-2013
    Location
    Reading
    MS-Off Ver
    Excel 2013
    Posts
    19

    Re: Value furthest from zero between cell range

    Quote Originally Posted by hemesh View Post
    Hello pete try this in L42
    =MIN(IF((P$3:P$707>=A41)*(P$3:P$707<A43),IF(Q$3:Q$707>0,Q$3:Q$707))) array entered!
    Hi Thanks

    Returns a value of 34

    The furthest value from zero between the range is -150.

  4. #4
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Value furthest from zero between cell range

    Sry Misunderstood
    =MIN(IF((P$3:P$707>=A41)*(P$3:P$707<A43)*(Q$3:Q$707<0),Q$3:Q$707)) Try this!

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: Value furthest from zero between cell range

    Does this help ?
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    11-27-2013
    Location
    Reading
    MS-Off Ver
    Excel 2013
    Posts
    19

    Re: Value furthest from zero between cell range

    Quote Originally Posted by hemesh View Post
    Sry Misunderstood
    =MIN(IF((P$3:P$707>=A41)*(P$3:P$707<A43)*(Q$3:Q$707<0),Q$3:Q$707)) Try this!
    Hi hemesh,

    That works for the lower value ie -150, but if I change the a positive value to greater 175 for example, -150 is still returned.

    In fact if I change -150 to a value higher than one of the other negative values in the range, ie change -150 to -10 then value -11 is retuned.

  7. #7
    Registered User
    Join Date
    11-27-2013
    Location
    Reading
    MS-Off Ver
    Excel 2013
    Posts
    19

    Re: Value furthest from zero between cell range

    Quote Originally Posted by Pepe Le Mokko View Post
    Does this help ?
    Please Login or Register  to view this content.
    Thanks. The formulae in K and L are just examples, I would like to return the value furthest away from zero (positive or negative) to cell J42 from column Q using the time range in A41 and A43.

  8. #8
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,827

    Re: Value furthest from zero between cell range

    With the formulas in K42 and L42, you could simply put =MAX(ABS(K42),abs(L42)) in J42.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  9. #9
    Registered User
    Join Date
    11-27-2013
    Location
    Reading
    MS-Off Ver
    Excel 2013
    Posts
    19

    Re: Value furthest from zero between cell range

    Quote Originally Posted by MrShorty View Post
    With the formulas in K42 and L42, you could simply put =MAX(ABS(K42),abs(L42)) in J42.
    Thanks, yeah I was hoping I could return the value with out adding two more columns as it's part of a much larger spreadsheet, but maybe that will be the option.

  10. #10
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: Value furthest from zero between cell range

    Helper columns sometimes make things easier. You can hide them if needed

  11. #11
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,827

    Re: Value furthest from zero between cell range

    How much nesting you want to do is kind of up to you and your skill at building and debugging large, complex, multi-level functions. I have always preferred to use helper columns/cells, so I haven't developed these skills to the same degree as many of the experts here.

    This particular one doesn't look like it should be too difficult to nest K42 and L42 into either Pepe Le Mokko's or my version of J42. Using a principle of substitution, you should be able to take and, where our functions have a reference to K42, simply paste in the formula from K42 (without the {}braces and the equals = sign). Once nested, J42 would also need to be an array function (ctrl-shift-enter).

  12. #12
    Registered User
    Join Date
    11-27-2013
    Location
    Reading
    MS-Off Ver
    Excel 2013
    Posts
    19

    Re: Value furthest from zero between cell range

    Thanks all

  13. #13
    Registered User
    Join Date
    11-27-2013
    Location
    Reading
    MS-Off Ver
    Excel 2013
    Posts
    19

    Re: Value furthest from zero between cell range

    Hi another one for you.

    I would like to be able to report the time value from column P for the value found.
    I can match the value and report the time with =INDEX($P$3:$P$722,MATCH(TRUE,$Q$3:$Q$722=J42,0)) but the values in Q are not always unique.

    Thanks

+ 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] Questions about formulas that return information in the furthest right cell
    By hilltop804 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-23-2013, 11:12 AM
  2. Using furthest down Cell for math statements
    By ssword in forum Excel General
    Replies: 19
    Last Post: 11-03-2010, 04:31 PM
  3. Return furthest right value
    By jonnya in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-14-2010, 10:59 AM
  4. Return furthest right value which is greater than zero
    By jonnya in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-12-2010, 03:54 PM
  5. Make a cell value = the furthest value to the right
    By Lucien in forum Excel General
    Replies: 9
    Last Post: 09-29-2008, 06:40 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