Closed Thread
Results 1 to 2 of 2

Conditional formatting of Pivot Table through VB

  1. #1
    Registered User
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    5

    Conditional formatting of Pivot Table through VB

    I am fairly new to VB programming and need some help with writing VB code to conditionally-format the pivot table shown here (I am not inclined to use the Excel Conditional formatting option as it loses the formatting when refreshing the pivot table)

    Excel_screenshot1.png

    I need a VB macro that reads each value in a Pivot table .. starting with the Col1, Row1 of the Pivot table .

    It then matches the value in Col 1, Row1 to the Baseline value for Col 1 that is specified in (Yellow ) .

    Note : The Baseline values are not part of the Pivot table area

    If the value in in the Col 1, Row1 is less than the baseline value for that column at the top ,it formats the font color of that pivot table cell (say to red)
    It then moves to read the value in Col 1, Row2 and does the same check .

    Once it completes the check on all values in Col 1, it does the same with Col 2 (where the values are compared to the baseline value for Col 2)
    ... and so on until all the colums of the PIvor table are validated in the same manner .



    Thanks for reading the post .. Appreciate any help in advance !!

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Conditional formatting of Pivot Table through VB

    Thread posted in CS forum, hence closed.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Pivot Table & Conditional Formatting Help
    By DallasArosco in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-07-2014, 01:05 PM
  2. [SOLVED] Pivot Table - Conditional Formatting
    By lewny1983 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-27-2012, 04:51 AM
  3. Conditional Formatting a pivot table
    By thestappa in forum Excel General
    Replies: 0
    Last Post: 09-01-2010, 04:04 PM
  4. Keep conditional formatting in pivot table
    By naquer in forum Excel General
    Replies: 0
    Last Post: 06-16-2010, 03:12 AM
  5. Pivot Table conditional formatting using VBA
    By Leonprivatemail in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-28-2010, 08:58 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