Vba code help-pivot table conditional formating

ER_Neha

Board Regular
Joined
Jul 25, 2020
Messages
130
Office Version
  1. 365
Platform
  1. Windows
Hello friends, I need a help in writing the vba code.

my requirement is:

to check in the original table ->column-> control ->if it contains "paid"->then in the respective pivot table I want the entire row of the pivot table of that respective column to be in red color, else->if the control column contains ->"unpaid" then I want the entire row in the pivot table of the respective column to be in yellow. I have constructed my pivot table using the vba code I am stuck in this conditional formatting as I am finding only formula related solution when I google it.

Here is the screen shot of my table and pivot table also I am providing the xl2bb of my table

please not the column control will be in the original table but not in the pivot table , it will be a pivotfield but not show in any row or column

Book1 (version 1).xlsb.xlsm
ABCDEF
2AResidential100043862januaryPaid
3BResidential150043961februaryNot paid
4CCommercial120044116marchPaid
5DConsulting500043988aprilPaid
6ACommercial250044050mayNot Paid
7CConsulting300044083junePaid
8BConsulting400044112julyNot paid
9CResidential200044015augustNot paid
Sheet2
 

Attachments

  • pivot.jpg
    pivot.jpg
    184.9 KB · Views: 2

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,214,918
Messages
6,122,243
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top