Conditional Formating

bethi

New Member
Joined
Jul 27, 2017
Messages
4
Hello - I am looking to conditionally format, in a pivot table, a cell based on whether it is more or less than the month before. Sounds simple enough, right? Wrong (at least for me)!


My dataset lists the item in rows, the months in columns, and the sum of quantity in the values.


I want to say, "if the qty of item xyz for February is greater than the qty of xyz for January, color that green." On the reverse side, I want to say "if the qty of item xyz for February is less than the qty of xyz for January, color that red."

[TABLE="class: cms_table, width: 200"]
<tbody>[TR]
[TD]ITEM[/TD]
[TD]JAN-17 QTY[/TD]
[TD]FEB 17 QTY[/TD]
[TD]MAR 17 QTY[/TD]
[TD]APR 17 QTY[/TD]
[/TR]
[TR]
[TD]XYZ[/TD]
[TD]24[/TD]
[TD]74[/TD]
[TD]35[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]50[/TD]
[TD]25[/TD]
[TD]20[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]EFG[/TD]
[TD]60[/TD]
[TD]88[/TD]
[TD]90[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]HIJ[/TD]
[TD]50[/TD]
[TD]25[/TD]
[TD]75[/TD]
[TD]50[/TD]
[/TR]
</tbody>[/TABLE]


Thank you in advance for your assistance.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
People alway do this.

What happens if it's equal ?
Based on your logic so far it will won't colour the cell green or yellow.
 
Upvote 0
With ITEM in A1

Select C2:E5

=(C2 > B2)
format as green

=(C2 < B2)
format as yellow

(remove spaces from the above formulas, forum restriction forced me to enter them)

Adjust the cell references based on where you have the table, ie if ITEM is not in A1
 
Last edited:
Upvote 0
Good point! I'm fairly new to the world of conditional formatting, I stumbled upon it by accident, so I am not certain what I would have it do is there is no change. I would welcome any suggestions though:)
 
Upvote 0
Thank you SO much! Your instructions were very easy to follow, and I was able to get it set up in no time.

Thanks again!
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,310
Members
452,634
Latest member
cpostell

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