+ Reply to Thread
Results 1 to 9 of 9

Conditional formatting of worksheet tabs

  1. #1
    Registered User
    Join Date
    06-15-2023
    Location
    Chicago, IL
    MS-Off Ver
    365
    Posts
    9

    Conditional formatting of worksheet tabs

    Greetings all,

    I've searched the forums for an answer and found a thread from 2015 but the suggestion posted isn't working on my sheet (or I'm not applying it properly).

    I have a cell in my worksheet ($J$12) that is conditionally formatted to change color depending on its value (progressive 5-color scale from green to red).
    I'd like the worksheet tab to be conditionally formatted to whatever color that cell is shaded.

    This will apply to multiple worksheets in the workbook.

    I'm pretty good with general excel programming but once we get into VBA code I'm at a loss. I'm assuming VBA coding is required here.

    Does anyone have a link to a thread that advises in understandable language how to do this?

    Thank you

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Conditional formatting of worksheet tabs

    Hi there,

    Try inserting the following code in the VBA CodeModule of the worksheet which contains your Cell $J$12 (i.e. not in a standard module):

    Please Login or Register  to view this content.

    Hope this helps.

    Regards,

    Greg M

  3. #3
    Registered User
    Join Date
    06-15-2023
    Location
    Chicago, IL
    MS-Off Ver
    365
    Posts
    9

    Re: Conditional formatting of worksheet tabs

    Thanks Greg,

    Doing so changed the tab to white. It does not seem to be picking up the conditional color change to that cell.
    Attachment 833352
    Attachment 833353

    For the record, on this sheet the referred cell is H12 which I updated in the code.
    Last edited by rmart911; 06-16-2023 at 08:36 AM.

  4. #4
    Registered User
    Join Date
    06-15-2023
    Location
    Chicago, IL
    MS-Off Ver
    365
    Posts
    9

    Re: Conditional formatting of worksheet tabs

    Oh sweet!!
    Never mind, apparently it didn't work until I switched sheets and went back, now it's working.

  5. #5
    Registered User
    Join Date
    06-15-2023
    Location
    Chicago, IL
    MS-Off Ver
    365
    Posts
    9

    Re: Conditional formatting of worksheet tabs

    Is there a way to set it to default color (gray) when the cell value is null? Currently the tabs are white (due to background color). What would the code look like to say if cell has value then interior color, otherwise default color?

  6. #6
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Conditional formatting of worksheet tabs

    Hi again,

    Try:

    Please Login or Register  to view this content.

    Hope this helps.

    Regards,

    Greg M

  7. #7
    Registered User
    Join Date
    06-15-2023
    Location
    Chicago, IL
    MS-Off Ver
    365
    Posts
    9

    Re: Conditional formatting of worksheet tabs

    Got an error.

    SS3.PNG
    SS4.PNG

  8. #8
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Conditional formatting of worksheet tabs

    Reply from my phone.

    Of course you got an error - there's no such thing as Cell *H12*

    Regards,

    Greg M

  9. #9
    Registered User
    Join Date
    06-15-2023
    Location
    Chicago, IL
    MS-Off Ver
    365
    Posts
    9

    Re: Conditional formatting of worksheet tabs

    But... but... but there is!!

    edit: oh... embarrassed face...

    That did the trick!!

    Thank you!!
    Attached Images Attached Images
    Last edited by rmart911; 06-17-2023 at 06:34 PM.

+ 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 on 2 seperate tabs
    By juco in forum Excel General
    Replies: 5
    Last Post: 03-08-2019, 01:39 PM
  2. Conditional Formatting by row NAME for multiple tabs
    By macroloser in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-30-2014, 03:51 PM
  3. Conditional Format Worksheet Tabs
    By tommyfernandez in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-27-2013, 01:07 PM
  4. [SOLVED] (Perhaps) Conditional Formatting - Tabs
    By DMcC in forum Excel General
    Replies: 12
    Last Post: 03-25-2013, 06:58 AM
  5. Conditional Formatting - Worksheet Tabs
    By Nubbers in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-12-2013, 02:10 AM
  6. [SOLVED] Conditional Formatting Between Two Sheets/Tabs
    By garrett.grillo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-27-2012, 07:45 PM
  7. Formatting Worksheet Tabs
    By RobPot in forum Excel General
    Replies: 0
    Last Post: 03-17-2005, 09:57 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