Excel - more than 3 conditional formats

  cedricthecat 14:15 10 May 2007

I know I've seen the coding to do this somewhere, but I can't find it!

Can anyone remind me how to do it, as I need 5 conditions....


(Vog, where are you?!)

  silverous 15:00 10 May 2007

Google is your friend. I just searched for "more than 3 conditional formats" and got a heap of results back including:

click here

  cedricthecat 15:37 10 May 2007

Ta, but Vog is my friend too! ;-)

I know that he pointed me towards a forum once where he'd got a nice little series of Excel tips, and this was one of them - trouble is, I can't remember where it was! I like the "workaround" in the link you gave, but I'd like to use VBA on this one if possible

  silverous 15:52 10 May 2007

I would've thought a non-VBA solution would be easier, if you are comfortable with VBA then I would've thought you'd have done it without posting.

Try adding VBA to the above search on google and you get several more results all of which seem to solve it.

VoG may be busy/offline.

  cedricthecat 15:58 10 May 2007

I'm comfortable enough with VBA to use it, but not generally to write it!

Vog has been very helpful in the past, and has supplied "bare-bones" VBA stuff for me, but always left me enough work to do myself that I can feel just a little bit proud! ;-)

I found code that let's me change text colours, but can't find one for the backgrounds - probably easy enough, but I want to cheat!

  silverous 16:22 10 May 2007

Presumably your code that does text colours has something like

thecell.Font.ColorIndex = vbRed

or something like that. To do the background you simply change it to be:

thecell.Interior.ColorIndex = vbRed

i.e. change .Font to be .Interior and you are there.

Generally with VBA once you have some code you can often google to find what you need to do with it once you are comfortable. E.g. in your situation with the above all I did was google "excel vba background colour" or "excel vba font colour" to compare the different syntax for the two.

Hope this helps, let me know.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Best phone camera 2017

Stunning new film posters by Hattie Stewart, Joe Cruz & more

iPad Pro 10.5in (2017) review

28 astuces pour profiter au mieux de votre iPhone