+ Reply to Thread
Results 1 to 2 of 2

Modify Current VBA Cell Background Color Code

  1. #1
    Forum Contributor
    Join Date
    04-20-2011
    Location
    New York, New York
    MS-Off Ver
    Excel 2010
    Posts
    160

    Modify Current VBA Cell Background Color Code

    Hi,

    My current code changes the cell background color of all cells in Column A based on their value. I’ve attached the Excel Workbook (PivotTableReport) to this post. I want to modify this code so it meets the description below:

    I have three pivot fields in my pivot table found on worksheet (Current Macro). The first pivot field is found in Cell A9 by the name of “Type” and what I would like the new Macro to do is change the cell background color of the cell that contains the value "Team Red” to Red and all the cells (A21) right under “Team Red” to Red that are associated to the value of “Team Red” (take a look at worksheet “After New Macro Visual” for a visual of what this would look like). The new Macro would then proceed to do the same for the value “People” and “M&A” with their respective colors. Again, the worksheet “After New Macro Visual” will give you a good visual of what I am looking for.

    Current Code:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by boldcode; 08-10-2011 at 08:29 AM. Reason: Solved by Marcol. Thanks!

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Modify Current VBA Cell Background Color Code

    Try this
    Please Login or Register  to view this content.

    Hope this helps
    Last edited by Marcol; 08-10-2011 at 02:35 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

+ 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