Formula contrl of background color

JAG-W

New Member
Joined
Sep 11, 2006
Messages
3
I need to control the background colour of a cell from a formula there are between 7-10 colours to set, I don’t want to use VBA as I need the colour to update instantly. Any suggestions welcome.

JAG-W
:-?
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Not possible, to my knowledge. You can't even use conditional formatting since it only allows 3 separate conditions. You need a macro.

This comes up all the time. Search the board for "more than 3 conditions", to use one example. If you want the macro to run when the formula(s) recalculate, you need to use a Worksheet_Calculate event, not a Worksheet_Change as a lot of the search results may show.
 
Upvote 0
What makes you think VBA wouldn't change the background automatically?
 
Upvote 0
If I could back up a little here this is a bolt on to a much bigger spreadsheet that will be able to print out a build plan showing colors and a number of graphics driven by a part number, my thinking was to drive the simple colour changes with a formula, and the graphics will be stacked bringing the selected on the front. My understanding is that the macros cant now be run from a formulae, and I really don’t want to have to trigger a macro button. If there is a way of automatically running a macro, then I think I have a solution but I cant find one. Any ides welcome

JAG-W
 
Upvote 0
From my (first) post yesterday:
This comes up all the time. Search the board for "more than 3 conditions", to use one example. If you want the macro to run when the formula(s) recalculate, you need to use a Worksheet_Calculate event, not a Worksheet_Change as a lot of the search results may show.

The macro won't run from the formula itself, however the sheet (re)calculation can trigger a Worksheet_Calculate macro to run.

Edit: There are other Event macros as well. Worksheets have Activate, Change and SelectionChange events, just to name a few (not to mention Workbook-level events as well). You should be able to find more info in the VBA help files and on the board.

Since you're working with graphics, I don't think I, personally would really be able to help with your specific issue. Many others around here more than likely can, though :)
 
Upvote 0

Forum statistics

Threads
1,225,475
Messages
6,185,195
Members
453,282
Latest member
roger_nz66

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