ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Multi format conditional formating (https://www.excelbanter.com/excel-programming/378069-multi-format-conditional-formating.html)

John Davies

Multi format conditional formating
 
I have a sheet, e.g. a1:h100. Is it possible to have more than 3 conditional
formats using code as per the example below?

cells a1:h1 would display red background if cell f1 = a
cell a1:h1 would display red background, bold text if cell f1 = b
cell a1:h1 would display blue underlined text if cell f1 = c
cell a1:h1 would display blue background with bold text if cell f2 = d
cell a1:h1 would display bold italic text if cell f1 = e
cell a2:h2 would display red background if cell f2 = a
cell a2:h2 would display red background, bold text if cell f2 = b
cell a2:h2 would display blue underlined text if cell f2 = c
cell a2:h2 would display blue background with bold text if cell f2 = d
cell a2:h2 would display bold italic text if cell f2 = e
and so on

Also would this code work on new rows if rows were inserted into a sheet
after the code has been inserted?

Thanks in advance of any help
John


Roger Govier

Multi format conditional formating
 
Hi John

Take a look at Bob Phillips site for his Condiditional Formatter +
http://xldynamic.com/source/xld.CFPlus.Download.html

--
Regards

Roger Govier


"John Davies" wrote in message
...
I have a sheet, e.g. a1:h100. Is it possible to have more than 3
conditional
formats using code as per the example below?

cells a1:h1 would display red background if cell f1 = a
cell a1:h1 would display red background, bold text if cell f1 = b
cell a1:h1 would display blue underlined text if cell f1 = c
cell a1:h1 would display blue background with bold text if cell f2 = d
cell a1:h1 would display bold italic text if cell f1 = e
cell a2:h2 would display red background if cell f2 = a
cell a2:h2 would display red background, bold text if cell f2 = b
cell a2:h2 would display blue underlined text if cell f2 = c
cell a2:h2 would display blue background with bold text if cell f2 = d
cell a2:h2 would display bold italic text if cell f2 = e
and so on

Also would this code work on new rows if rows were inserted into a
sheet
after the code has been inserted?

Thanks in advance of any help
John




Bob Phillips

Multi format conditional formating
 
I gave you an example in your previous post on this subject.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"John Davies" wrote in message
...
I have a sheet, e.g. a1:h100. Is it possible to have more than 3

conditional
formats using code as per the example below?

cells a1:h1 would display red background if cell f1 = a
cell a1:h1 would display red background, bold text if cell f1 = b
cell a1:h1 would display blue underlined text if cell f1 = c
cell a1:h1 would display blue background with bold text if cell f2 = d
cell a1:h1 would display bold italic text if cell f1 = e
cell a2:h2 would display red background if cell f2 = a
cell a2:h2 would display red background, bold text if cell f2 = b
cell a2:h2 would display blue underlined text if cell f2 = c
cell a2:h2 would display blue background with bold text if cell f2 = d
cell a2:h2 would display bold italic text if cell f2 = e
and so on

Also would this code work on new rows if rows were inserted into a sheet
after the code has been inserted?

Thanks in advance of any help
John





All times are GMT +1. The time now is 01:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com