+ Reply to Thread
Results 1 to 4 of 4

Conditional formatting

Hybrid View

  1. #1
    Registered User
    Join Date
    03-15-2021
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    17

    Conditional formatting

    Apologies if this in the wrong sub-forum.

    I have a table that has some names, associated with some store numbers and units. I am trying to create a table that just shows the names and the store numbers, with the store numbers for each name having conditional formatting based on rank (ranking least units to most).

    I'm a bit lost as to how to achieve this, especially in an aesthetic way, like with a colour scale, as I don't think colour scales can format one set of data based on another in the way I want.
    If I haven't been clear on what I'm trying to achieve, please let me know and I'll try to explain it better.

    Book2.xlsx

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,760

    Re: Conditional formatting

    You are correct. Conditional formatting, other than using a formula, can format only the cells containing the values of interest. And you can't do color scales with a formula.

    One option I can think of is to use CF applied to the units, then use VBA to make the store numbers match the coloring applied on the units.

    BUT you said "a table that just shows the names and the store numbers." If it doesn't include the units, then how can you rank them by units?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    03-15-2021
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    17

    Re: Conditional formatting

    The units columns would be hidden.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,760

    Re: Conditional formatting

    Attached is a VBA solution. The colors are set for a store every time there is any change in the Units for that store. But I'm not sure how that would happen if they're hidden. I have a feeling that there are important details about your question that are left out.

    What is the realistic number of stores can occur for each store name? This solution assumes the max is 97. The formula uses 99 so it sticks out.

    Also I discourage the use of merged cells. It prevented me from copying formatting from one column to another, and can cause all kinds of other problems.
    Attached Files Attached Files

+ 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 Formatting based on another cells Conditional Formatting
    By chriskay in forum Excel General
    Replies: 4
    Last Post: 08-22-2019, 05:33 AM
  2. [SOLVED] Override conditional formatting (in general, without changing the conditional formatting)
    By Stormin' in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-21-2017, 07:15 AM
  3. Conditional Formatting Removing Previous Conditional Formatting?
    By CravingGod in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2016, 01:02 PM
  4. Replies: 6
    Last Post: 01-08-2016, 06:44 PM
  5. Opening xlsm files with conditional formatting opens with removed conditional formatting
    By Martijn.Steenbakker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2014, 05:38 AM
  6. Replies: 1
    Last Post: 09-20-2013, 06:23 PM
  7. Replies: 3
    Last Post: 05-15-2012, 04:13 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