How can I convert conditional formatting into explicit formatting?

P

Patrick Harris

I have an Excel 2007 file in which I use 6 different conditional formatting
rules. This spreadsheet is also uploaded to a wiki page. I use an Excel
plugin to allow me show the file directly on the wiki page (without having to
open the file in Excel). However, any conditional formatting is lost in this
process. Standard, or explicit, formatting works fine. I have researched
this, and there is no way to get the conditional formatting to "take" on the
wiki. What I believe I need to do is convert the conditional formatting to
explicit formatting before uploading the file to the wiki page. I understand
this will likely require a VB macro. I have tried several, but they do not
seem to accomplish exactly what I need. This is where I need help.

- The macro must identify which rule for conditional formatting has been
applied to each cell, and then apply the exact same formatting of the
explicit variety. (I do not care if the conditional formatting is deleted, as
the wiki ignores it anyway.)

Details (in English):
Rule 1: If the value of the cell is "20", convert the background color to
red and the font to bold white.
Rule 2: If the value of the cell is "40", convert the background color to
orange and the font to bold white.
Rule 3: If the value of the cell is "60", convert the background color to
yellow and the font to bold black.
Rule 4: If the value of the cell is "80", convert the background color to
green and the font to bold white.
Rule 5: If the value of the cell is "100", convert the background color to
blue and the font to bold white.
Rule 6: If the value of the cell is "NT", convert the font to bold gray.

If you can give advice or post the macro(s) I need, please do. Any help will
be greatly appreciated. Thanks in advance,
Patrick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top