Omit zero values from conditional formatting

stefanaalten

Board Regular
Joined
Feb 1, 2011
Messages
71
Office Version
  1. 365
Platform
  1. Windows
How can I use conditional formatting to apply a colour scale to shade highest value brightly and scale the colour down to lowest non-zero value in a muted colour, but cells with zero values (many) not to have any shading. Data consists of positive integers in a column.

Other conditional formatting rules apply shading based on row number, so:
- If cell value is 0, conditional formatting that applies shading based on row number should determine the cell shading colour.
- If cell value is non-zero, apply shading to that cell with the colour based on the value (high=bright, down to low but non-zero = muted, effectively "overriding" shading based on row number).

(Changing the zero values to blanks ("") is not an option as this means that the column sorting does not work the way it is supposed to: the sort becomes alphabetical instead of numerical and if I then choose "Z to A" this results in all the "" values being listed first, whereas they should come last since the "" represents 0!)

Many thanks in advance for any help with this!
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,216,430
Messages
6,130,573
Members
449,585
Latest member
c_clark

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