Results 1 to 1 of 1

Pivot Table Conditional Format VBA

Threaded View

Platinum3x Pivot Table Conditional... 11-20-2014, 12:25 AM
  1. #1
    Registered User
    Join Date
    10-17-2012
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    71

    Question Pivot Table Conditional Format VBA

    I'm stuck trying to figure out how to highlight the .PivotFields("Client Detail Account") when .PivotFields("Detail Service Code").PivotItems("ZBA MASTER ACCOUNT MAINT ") is greater or equal to 1. Right now it is just highlighting the ZBA MASTER ACCOUNT MAINT Pivot Item within the Detail Service Code Pivot Field as the code shows. Any assistance with adding the little bit I'm missing would be great!

    Sub Colors_Click()
    
    Dim c As Range
      With ActiveSheet.PivotTables("Pivottable1")
        
        ' reset default formatting
        With .TableRange1
          .Font.Bold = False
          .Interior.ColorIndex = 0
        End With
        
        ' apply formatting to each row if condition is met
         For Each c In .PivotFields("Detail Service Code").PivotItems("ZBA MASTER ACCOUNT MAINT ").DataRange.Cells
          If c.Value >= 1 Then
            With .TableRange1.Rows(c.Row - .TableRange1.Row + 1)
              .Interior.ColorIndex = 6
            End With
          End If
        Next
        
      End With
    
    End Sub
    Cheers
    Last edited by Platinum3x; 11-20-2014 at 08:32 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. reorganizing data from pivot table format to a format more suitable for presentations
    By pwent_1975@yahoo.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-12-2013, 01:41 PM
  2. Conditional Format in pivot table ??
    By Oly Steel Man in forum Excel General
    Replies: 4
    Last Post: 01-20-2011, 04:22 PM
  3. Pivot Table conditional Format
    By Kearse56 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-01-2007, 05:00 PM
  4. [SOLVED] Conditional Format and Pivot Table
    By Jenn in forum Excel General
    Replies: 1
    Last Post: 10-23-2005, 01:05 PM
  5. [SOLVED] Keep conditional format when "show pages" from Pivot table
    By Angus in forum Excel General
    Replies: 7
    Last Post: 06-30-2005, 09:05 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