I managed to do it the hard way. See attachment. And I mean HARD...
The basic idea is that in a separate table I put TURE values if I want to select that cell and FALSE if I don't, then I use two for loops to add extra cells to the selection with
when the corresponding value is true. Then I make conditional formatting for selection.
First I made a table of random numbers which are either percentages or big numbers. Every time you change something on the spreadsheet or press calculate sheet these numbers get recalculated, so you can see it still works when something changes. I made it so that small percentages are blue, big ones are red and big numbers are ignored (left white). Unfortunately to do this I had to remove all conditional formatting in the VBA code for that selection, so you can only add additional conditional formatting in code. (Curently everything is "0.00%" and big numbers are "general"). If you want to put the table somewhere else you have to change the reference in W4 (R1C1 style) There are some calculations hidden on the left. If you want to use a bigger table than 12 coloumns and 10 rows you have to autofill the table at: A19:M29.
In case you want to change the colors of the heat map:
View ->Macros ->record macro ->Ok
Home -> Conditional Formatting -> New rule
Change the colors as you want
View ->Macros ->stop recording
Replace the "Colors" macro with the freshly recorded one.
If you're happy with my answer you could change the question to: "Exclude cells based on value from conditional formatting (Color Scales)" so that someone can find it easier in the future.
Bookmarks