Color Coding with VBA

Rasec

New Member
Joined
Aug 18, 2011
Messages
20
Hello,

Is it possible for excel to color code cells based on the following criterias:

1) # is hardcoded in a cell
2) Cell contains a formula that [DOES NOT] reference another tab in the model
3) Cell is referencing another tab

If the cell has two of the criterias above (a hardcoded # and references a cell can it color it with another color?

<TABLE style="WIDTH: 429pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=572><COLGROUP><COL style="WIDTH: 429pt; mso-width-source: userset; mso-width-alt: 10459" width=572><TBODY><TR style="HEIGHT: 10.5pt" height=14><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: #e26b0a; WIDTH: 429pt; HEIGHT: 10.5pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: windowtext 0.5pt solid" class=xl271 height=14 width=572>=$B$85-J75</TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: #00b0f0; WIDTH: 429pt; HEIGHT: 10.5pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: windowtext 0.5pt solid" class=xl274 height=14 width=572>0</TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; WIDTH: 429pt; HEIGHT: 10.5pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: windowtext 0.5pt solid" class=xl269 height=14 width=572> </TD></TR><TR style="HEIGHT: 21pt" height=28><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: #92d050; WIDTH: 429pt; HEIGHT: 21pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: windowtext 0.5pt solid" class=xl273 height=28 width=572>=IF('Assumptions '!$D$111="Fixed",'Availability Period'!$B$92,'Interest Rate Strategy'!$M$35)</TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; WIDTH: 429pt; HEIGHT: 10.5pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: windowtext 0.5pt solid" class=xl269 height=14 width=572>0</TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: #92d050; WIDTH: 429pt; HEIGHT: 10.5pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: windowtext 0.5pt solid" class=xl272 height=14 width=572>=IF(J9<='Development Costs Budget'!$B$15,J87,0)</TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: #92d050; WIDTH: 429pt; HEIGHT: 10.5pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: windowtext 0.5pt solid" class=xl270 height=14 width=572>=IF(J9<='Development Costs Budget'!$B$15,(J90+J91)*J89/12,0)</TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: #e26b0a; WIDTH: 429pt; HEIGHT: 10.5pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: windowtext 0.5pt solid" class=xl271 height=14 width=572>=J90+J91+J92</TD></TR></TBODY></TABLE>


PLEASE HELP :)
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,224,542
Messages
6,179,421
Members
452,913
Latest member
JWD210

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top