Conditional Formatting - Pivot Table

GeorgeTimes

New Member
Joined
Jul 22, 2022
Messages
16
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2013
  6. 2011
  7. 2010
  8. 2007
Platform
  1. Windows
Hi all,

I'm struggling with formatting a pivot table based on some conditions.

My Pivot table has Countries as columns and Date as Rows (will attach a screenshot).

I need to fill the cells with Red if Blank, however for some of the countries (i.e Egypt,Ethiopia) if Blank need to fill with Grey.

Is there anyway I can do this? I know how to format if cells are Blank, but I can only do it with 1 colour, don't know how to do it based on specific countries.
I also need this to work for next months as well (atm last month is July 2022 - column C, but next month will add a new month which will be in column D and so on..)
 

Attachments

  • 3.png
    3.png
    4.1 KB · Views: 11

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hi all,

I'm struggling with formatting a pivot table based on some conditions.

My Pivot table has Countries as columns and Date as Rows (will attach a screenshot).

I need to fill the cells with Red if Blank, however for some of the countries (i.e Egypt,Ethiopia) if Blank need to fill with Grey.

Is there anyway I can do this? I know how to format if cells are Blank, but I can only do it with 1 colour, don't know how to do it based on specific countries.
I also need this to work for next months as well (atm last month is July 2022 - column C, but next month will add a new month which will be in column D and so on..)
In conditional Formatting Use Formula -
Excel Formula:
=And($A1="Egypt",$B1="")
and choose the format you want. Simple
 
Upvote 0
In case of multiple countries use -
Excel Formula:
=And(OR($A1="Egypt",$A1="Ethiopia"),$B1="")
Thank for your reply. However this seems to not work.

Based on your formula, Egypt or Ethiopia needs to be in A1, however, they're in A55 and A57. Also, next month, their row number will change as I have different amount of countries every month, therefore I cannot specify A55=Egypt.

Any ideas?
 
Upvote 0

Forum statistics

Threads
1,214,826
Messages
6,121,794
Members
449,048
Latest member
greyangel23

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