+ Reply to Thread
Results 1 to 4 of 4

Can anyone help me with a sequentially colour coded tab?

  1. #1
    Registered User
    Join Date
    09-24-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    10

    Can anyone help me with a sequentially colour coded tab?

    Hi,

    I already have some VBA that will set the tab colour based on content in 5 key cells. The problem is that it isn't sequential, so if someone completes cells 1,2 & 5, the tab changes to the colour for cell 5, whereas I need the tab to be the colour for cell 2. So the tab colour should always sequentially represent the number of steps completed, even if at some point, one of the steps is undone (cell contents deleted).

    I'd appreciate any push in the right direction. I don't know very much about VBA at all.

    Snippet attached.

    Thanks,

    Tow
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Can anyone help me with a sequentially colour coded tab?

    Dunno if this helps, here's a formula solution.

    Array formula, use Ctrl-Shift-Enter

    =MAX(FREQUENCY(IF(B1:B5=1,A1:A5),IF(B1:B5=1,0,A1:A5)))

    Column A can be anything
    Column B are 1s for that task is complete, otherwise 0 or blank, ie anything but 1
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    09-24-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    10

    Re: Can anyone help me with a sequentially colour coded tab?

    Hi Special-K,

    Thank you for your suggestion.

    I have a working model based on spreadsheet formulas, which I am much more familiar with than VBA. In my model, I can sequentially change an "indicator" cell from 1 to 5 based on the number of steps completed. If someone completes steps 1, 2, 4 & 5, for example, the number will show 2, because step 3 is not complete. As soon as step 3 is complete, it will show 5.

    I can also change my tab colour according to numbers 1 to 5 entered into a cell directly, so you would think I have the full solution but my VBA doesn't activate unless I enter the value into the cell directly. My formula method above, does not trigger the VBA.

    Either I need to find a way of combining the two, or I have to find a way of completing the equivalent in VBA.

    Tow

  4. #4
    Registered User
    Join Date
    09-24-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    10

    Re: Can anyone help me with a sequentially colour coded tab?

    Okay,

    So I have cobbled together a solution but I'm sure it could be more efficient.

    My solution is a combination of spreadsheet formulas and VBA. The spreadsheet formulas allow me to detect content in 5 dispersed cells and create a sequential output in a single cell, with a value of 1 to 5, representing the steps completed.

    The VBA looks at the single cell (G7 in my model), and sets the tab colour according to a set of value/colour combinations.

    I think if I could select the 5 cells for Target.Address in one go, I'd feel happier but I can't find the syntax that will let me select 5 dispersed cells as opposed to a block of cell, which seems to be far easier.

    I've attached my script for comment.

    Once again, any help appreciated.

    Tow
    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. Help Creating a Colour-Coded Monitoring Sheet
    By oyoung92 in forum Excel General
    Replies: 16
    Last Post: 10-11-2016, 04:47 PM
  2. [SOLVED] Sequentially number tabs
    By khorner in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-03-2014, 12:14 PM
  3. [SOLVED] Grouping tabs by colour and then order [tabs within each colour] by cell value
    By jessello in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-12-2013, 03:15 PM
  4. naming multiple tabs sequentially
    By baneVader in forum Excel General
    Replies: 17
    Last Post: 05-30-2008, 08:41 AM
  5. Colour coded Validation Lists?
    By darklord in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 04-12-2007, 10:02 AM
  6. [SOLVED] Can the sheet tabs be color coded?
    By Lynn in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-24-2006, 08:35 AM
  7. [SOLVED] rating cells 1-5 colour coded HOW?
    By treetop40 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 08-09-2005, 08:05 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