+ Reply to Thread
Results 1 to 9 of 9

Thread: Conditional format closest number in a range

  1. #1
    Registered User
    Join Date
    09-08-2009
    Location
    St. Louis, MO
    MS-Off Ver
    Excel 2007
    Posts
    36

    Conditional format closest number in a range

    I've google searched this site and cannot see any posts that accomplishes what I'm after. A few are close but I'm not getting the desired effect.

    I have a number in cell L32, say 6214. I would like to conditional format cells M33:M44 so that it highlights the first number below it without going over the number higher than it.

    So in this case, Aug - 5697 would be the conditional format.

    Thanks in advance!
    6214


    Jan 712
    Feb 1424
    Mar 2136
    Apr 2848
    May 3560
    Jun 4273
    Jul 4985
    Aug 5697
    Sep 6409
    Oct 7121
    Nov 7833
    Dec 8545
    Last edited by purdue7997; 01-06-2012 at 03:02 PM.

  2. #2
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,238

    Re: Conditional format closest number in a range

    Provided the numbers are increasing as in the example, you could use the formula:

    =M33=VLOOKUP($L$32,$M$33:$M$44,1,TRUE)


    Select all the cells in the range M33:M44 and apply the formula.


    Regards, TMS

  3. #3
    Valued Forum Contributor dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    New Delhi, India
    MS-Off Ver
    Excel 1997, 2000, XP, 2003, 2007, 2010
    Posts
    2,406

    Re: Conditional format closest number in a range

    Hi purdue,

    Got your point and it is quite practical as well.
    See the attached file and let us know if this is what you were looking for


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files
    DILIPandey
    +919810929744
    dilipandey@gmail.com

  4. #4
    Registered User
    Join Date
    09-08-2009
    Location
    St. Louis, MO
    MS-Off Ver
    Excel 2007
    Posts
    36

    Re: Conditional format closest number in a range

    You guys rule! Both works! I'll mark as solved and rep both. Thanks again!

  5. #5
    Valued Forum Contributor
    Join Date
    12-14-2009
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    986

    Re: Conditional format closest number in a range

    Highlight the table > Condition Formatting > Custom Rule > Enter =MATCH($A$1,$B$4:$B$15,1)=ROW($A1)
    Attached Files Attached Files
    To thank someone who has helped you, click on the star icon below their name.

    I hate reading

    Portfolio

    I need a job.
    I am young and incompetent

  6. #6
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,238

    Re: Conditional format closest number in a range

    You're welcome, thanks for the rep.

  7. #7
    Registered User
    Join Date
    09-08-2009
    Location
    St. Louis, MO
    MS-Off Ver
    Excel 2007
    Posts
    36

    Re: Conditional format closest number in a range

    Thanks JieJenn, that works also. Rep sent.

  8. #8
    Valued Forum Contributor
    Join Date
    12-14-2009
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    986

    Re: Conditional format closest number in a range

    Post deleted
    To thank someone who has helped you, click on the star icon below their name.

    I hate reading

    Portfolio

    I need a job.
    I am young and incompetent

  9. #9
    Valued Forum Contributor dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    New Delhi, India
    MS-Off Ver
    Excel 1997, 2000, XP, 2003, 2007, 2010
    Posts
    2,406

    Re: Conditional format closest number in a range

    Thanks purdue..!!

    Cheers

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey
    +919810929744
    dilipandey@gmail.com

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