When you’re setting up your icon set, change the “Type” to Formula from “Percent”, and you should be able to do what you’re after.
You’re right that you can’t use a formula in a conditional format and do anything to blank cells, but you could always use a helper column to coerce your values the right way, then conditionally format that with the formula. (In my experience, it does work.)
Of course, if you can coerce your values using a formula to put it in a cell, you could do so in the formula for the conditional format anyway, so the helper column may not be necessary.
]]>If you’re willing to let the zero cell have a green check, you can just set both the green check and the yellow bang conditions to >= 0. The yellow one won’t ever get hit.
What I’m trying to find is a way to have two icon-set rules that get applied based on formula. For “cash inflow” accounts I want the default arrow icons. For “cash outflow” accounts I want them with reversed order. The UI doesn’t allow you to put a formula and then use an Icon Set. The object model SAYS there’s a Formula property for the IconSetCondition object (and Excel Help even says it works), but I just get an error. Have you played with this at all?
(I’m also totally annoyed that the new formatting can only use the value from the current cell as the base value. I really want it to be the result of a formula. If it were a formula, I could achieve my objective by having the formula secretly invert the values of the “cash outflow” accounts. But using a formula for the value doesn’t appear to be even ostensibly possible.)
Nice blog. I’ll have to bookmark you.
Cheers,
Reed
So you want to hide any remaining conditional formats before you print? You could have a look at http://www.excelguru.ca/blog/2009/05/11/trigger-conditional-formats-before-printing/
To make that work you’d end up with a formula like:
=AND(Len(A1)=0,rngPrintMode=”Yes”)
I haven’t actually tried to evaluate this using at CELL statement personally.
]]>That works but the problem is not with all tha highlighted that will print onto the labels we are using. Is there anyway to combine the len statement so that it will work with the Cell statement?
Thanks
]]>You actually only need one condition. Set up your rule with the following formula (assuming the cell is A1):
=Len(A1)=0
Set the format to the colour you want.
At this point it should highlight any cell that has no data in it. Put something in and the colour will go away.
]]>Thanks
Geoff
]]>Debra Dalgleish wrote up an article on making icon sets in 2003: http://blog.contextures.com/archives/2009/04/14/conditional-formatting-icons-in-excel-2003/
Cheers,
Ken
]]>Is there any equivalent version of this great hint for Excel 2003, or can it be replicated with VBA?
]]>