I need to use a macro to apply colours to a cell based on the cell value and if that cell value is changed subsequently I want the macro to run again - is this possible, please?
I need to use a macro to apply colours to a cell based on the cell value and if that cell value is changed subsequently I want the macro to run again - is this possible, please?
Sure - you can use the worksheet change event and color it by the cell's new value.
If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)
You can't do one thing. XLAdept
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin
I am using Excel 2000 - does that have worksheet change event?
Yes - bring up the code module for the worksheet where you want the code to run and choose worksheet from the leftmost drop down - it will bring up the selection change event - from the right most dropdown you can then choose the Worksheet_Change event - it will give you the code envelope and you're ready to start coding
Target is automatically the cell selected ( a range).
you can also use conditional formatting without any code subject to a 4 condition limit (3 for conditional formatting plus the default cell formatting)
Josie
if at first you don't succeed try doing it the way your wife told you to
in the vb editor you should see the attached. I've highlighted the dropdowns
Maybe by using the terminology "leftmost" and "rightmost" I, inadvertently, mislead you as there are only two as shown by JosephP's pic of the envelope I described????
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks