+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    01-29-2010
    Location
    NY
    MS-Off Ver
    Excel 2003
    Posts
    7

    Returning smallest/largest change

    Hi everyone

    This is probably an easy problem, but I've been trying to get this thing to work for a few hours now and I'm getting frustrated.

    Suppose you have a list of several percentage changes:
    4%
    1%
    -3%
    -5%

    What kind of command can you use while in conditional formatting so that it'll highlight 1% as the smallest % change? Min and small commands don't seem to work since they both return -5% as the smallest change (but instead it's actually the biggest).

    Any suggestions? Thanks!

  2. #2
    Forum Moderator Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2007
    Posts
    5,212

    Re: Returning smallest/largest change

    Hi Koolaid,

    Let's say your list is in A1:A4. Select that range and then:

    To highlight the largest change set conditional formatting formula to:

    =OR(A1=MAX(ABS($A$1:$A$4)),-A1=MAX(ABS($A$1:$A$4)))

    To highlight the smallest change, use:

    =OR(A1=MIN(ABS($A$1:$A$4)),-A1=MIN(ABS($A$1:$A$4)))

  3. #3
    Forum Moderator shg's Avatar
    Join Date
    06-21-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007
    Posts
    25,134

    Re: Returning smallest/largest change

    Or =ABS(A1)=MIN(ABS($A$1:$A$4))
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    01-29-2010
    Location
    NY
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Returning smallest/largest change

    Awesome! Both works great, thanks Paul and shg!

    Can I also tell it to not return 0s as the smallest value? i.e. the next smallest?
    I tried using

    =ABS(A1)=SMALL(ABS($A$1:$A$4),2)

    but that didn't seem to work.

  5. #5
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,379

    Re: Returning smallest/largest change

    You could use

    =ABS($A1)=MIN(IF($A$1:$A$4<>0,$A$1:$A$4))

    which would avoid issues with blanks (should they exist)
    Last edited by DonkeyOte; 03-12-2010 at 08:02 AM.

  6. #6
    Registered User
    Join Date
    01-29-2010
    Location
    NY
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Returning smallest/largest change

    Thx DonkeyOte, that did the trick!

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.2.0