+ Reply to Thread
Results 1 to 8 of 8

Changing tab color based on cell value

  1. #1
    Forum Contributor
    Join Date
    10-02-2012
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    252

    Changing tab color based on cell value

    Hi guys, I wonder if any one here can help me.

    I have a sheet that alerts me if any new customers have appeared in our database. My problem is I have to manually check this worksheet to see if anything new has appeared.

    I thought the best way to resolve this would to create a macro that will change the tab color based on the value of a cell. The code below works in the sense that if the cell value is "refreshed" (sorry I don't the correct term) manually by me selecting the cell and hitting enter, the tab color changes. It however is not doing this off its own back, which is why I implement it in the first place.

    The following code is in the sheet code, not a seperate module;

    Please Login or Register  to view this content.
    Can any one advise where I am going wrong?

    Many thanks!

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Changing tab color based on cell value

    Prize,
    You left out the "Target" which is the triggering range for the code to work automatically. Which column/row need to be changed inorder for the tab colour to change. Is it column B?

  3. #3
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Changing tab color based on cell value

    explain better, for me your code works
    If solved remember to mark Thread as solved

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Changing tab color based on cell value

    With ou testing it, try this one
    Please Login or Register  to view this content.
    Last edited by AB33; 11-22-2012 at 07:28 AM.

  5. #5
    Forum Contributor
    Join Date
    10-02-2012
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    252

    Re: Changing tab color based on cell value

    Ah great, will give it a try! Will have to wait until the data connection brings over new customer data to see if it works though.

    Many thanks AB33!
    Last edited by PrizeGotti; 11-22-2012 at 05:48 AM.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Changing tab color based on cell value

    You can also try this code

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    10-02-2012
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    252

    Re: Changing tab color based on cell value

    Quote Originally Posted by AB33 View Post
    You can also try this code

    Please Login or Register  to view this content.
    The first code just replaced the formula in cell B4 with the value of 2. Gonna try the second code now.

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Changing tab color based on cell value

    Sorry Prize! It was my mistake.Please replace value by column. I have also amended my post

+ 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.6.0 RC 1