VBA to highlight row and limit

ANE0709

Board Regular
Joined
Feb 2, 2022
Messages
65
Office Version
  1. 365
Platform
  1. Windows
Not sure how to word that but i started writing a change event that highlights the row if certain conditions are met. im still very much learning change events and highlighting using VBA so im not sure how to work this, what i have is a start but probably far off. Basically the conditions i am trying to meet are:

Highlight columns A-AP if:
if the value of column C = C then highlight row green (color 5296274)
if column I <> 0 then highlight yellow (color index 6)
if column I and column L <> 0 then highlight yellow (color index 6)
if column J and column L <> 0 then highlight purple (color index 39)

Should there be a conflict with column C, I, and J i want column C to take priority. This shouldnt ever happen unless there is user error but just in case.

Columns C and I-P are all manual entry by the user.

1651168559201.png
 
Have you test my earliest code in #17?
It trigger change from row 4, and update the color automaticaly.
yes, it works just as well and just as fast as JohnnyL's and solves the color change bug. :LOL::LOL:

Both solutions are great and i will be keeping both versions for future projects! its late for me, have a good night! :):)
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,214,920
Messages
6,122,279
Members
449,075
Latest member
staticfluids

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