+ Reply to Thread
Results 1 to 6 of 6

Conditional formating and worksheet tab color

  1. #1
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    378

    Question Conditional formating and worksheet tab color

    I have a worksheet that with help from other Excel Forum users, I have created a macro that will create a pivot table of the data on the worksheet and then creates a calculated column next to the pivot table. The calculated column shows the variance between the two columns and shows how many devices are due back to the customer. Is there a way that I can a addition VBA so that when all of the calculated fields are "0", the worksheet tab gets colored green?

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Conditional formating and worksheet tab color

    Hi,

    I just turned on the macro recorder and colored the tab green. Find that code below. If you put this code in an if condition after a check of the calculated fields, it might do the trick.
    Please Login or Register  to view this content.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    378

    Re: Conditional formating and worksheet tab color

    I kind of had that part figured out. I need help with creating the statement that checks for all of the calculated values are "0" and if yes then the tab color changes. Can you assist with that?

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Conditional formating and worksheet tab color

    Say you add all your values to check and put the sum in A14.
    Your code could be:
    Please Login or Register  to view this content.
    For a better answer or understanding of the problem we need to see a sample workbook.
    Last edited by MarvinP; 05-24-2012 at 09:54 AM.

  5. #5
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    378

    Re: Conditional formating and worksheet tab color

    Here is a sample of what I am working with.

  6. #6
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    378

    Re: Conditional formating and worksheet tab color

    I have a range of cells that all values must be "0" before the tab color changes to Green.

+ 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