+ Reply to Thread
Results 1 to 6 of 6

format cells between values -- MANY ranges, similar to icon sets

  1. #1
    Registered User
    Join Date
    02-03-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    25

    format cells between values -- MANY ranges, similar to icon sets

    I have a column of numbers and I'd like to format the cells based on their values using something like the "between two values" rule. The problem is there are so many ranges it would take me forever to create a conditional formatting rule or if statement for each one; plus I will probably need to edit the ranges and/or colors often enough that it would get annoying.

    The "Icon Sets" style under "Format all cells based on their values" is a decent example of what I'm trying to accomplish if it was possible to add more rules and fill the cells with a color instead of an icon.

    Does anyone know of a way to create a bunch (20 or more) of "between two values" rules and fill each range with a different color?

    Any help or guidance would be appreciated.

    PS: If I didn't explain myself well enough regarding the ranges, an example would be: fill cells with any amount between 0 and 49 in blue, 50 through 99 in orange, 100 through 999 in green, 1000 through 2999 in yellow, etc. (I'm open to formatting the cell or text a different way if filling it isn't possible.)

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: format cells between values -- MANY ranges, similar to icon sets

    Hi acp,

    Excel has a palette of 56 colors that you could choose from, they are invoked by their color index.

    Palette.jpg

    You could use a select case or a list of criteria and associated indices
    Last edited by xladept; 08-18-2015 at 07:50 PM.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    02-03-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: format cells between values -- MANY ranges, similar to icon sets

    Thanks for such a quick reply. The color index is really helpful but I have to admit you lost me after that. I'm not sure what a select case is or how to use associated indices with a list of criteria.

    I know how to create formulas, if statements, conditional formatting rules, etc. but I don't know how to write them from scratch if they're even a little complicated. I usually search this forum for a similar problem and then modify the solution to fit my needs.

    Any chance you could provide a bit more guidance? I'm pretty good at following the instructions in Microsoft's help files so even if you only have time to tell me what to search for, that would still be really helpful.

    Thanks!

    PS: I forgot to mention in my original post that I use Excel 2010.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: format cells between values -- MANY ranges, similar to icon sets

    Hi acp,

    Try this:

    Please Login or Register  to view this content.
    *You'll need to alter the red code according to your specs

    Directions for running the routine(s) just supplied

    If you haven't used macros before you'll need to go to:
    File- options - trust center -trust center settings - macro settings ,
    the second option down (disable all macros with notification)

    Then - Copy the code to the clipboard

    Open your Workbook

    Press ALT + F11 to open the Visual Basic Editor.

    Select "Module" from the Insert menu

    Type "Option Explicit" then paste the code under it

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name
    *Be sure to save the book with the code as Macro-Enabled
    Last edited by xladept; 08-19-2015 at 04:31 PM.

  5. #5
    Registered User
    Join Date
    02-03-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: format cells between values -- MANY ranges, similar to icon sets

    I didn't think I was going to get this to work but it did on the first try! Thanks so much for the help. I can't imagine how long it must have taken to type it all out but I really appreciate it.

    Thanks again!

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: format cells between values -- MANY ranges, similar to icon sets

    You're welcome and thanks for the rep!

    About ten minutes to type, about a night's sleep to figure what to type

+ 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] Conditional format using icon sets to compare two columns
    By scottiex in forum Excel General
    Replies: 5
    Last Post: 06-15-2017, 12:26 AM
  2. [SOLVED] Icon sets
    By RobertM01 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-22-2013, 07:18 PM
  3. Replies: 2
    Last Post: 05-01-2013, 12:23 AM
  4. Replies: 9
    Last Post: 07-20-2012, 12:52 PM
  5. [SOLVED] Icon Sets
    By bnoc8418 in forum Excel General
    Replies: 0
    Last Post: 04-02-2012, 03:37 PM
  6. icon sets
    By by1612 in forum Excel General
    Replies: 2
    Last Post: 11-26-2008, 08:24 PM
  7. IF with icon or similar
    By Marina Limeira in forum Excel General
    Replies: 2
    Last Post: 06-13-2005, 09:05 PM

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