VBA Conditional Formatting with vlookup

KSC17ME

New Member
Joined
Mar 1, 2019
Messages
1
Can someone help to translate the following NON-VBA conditional formatting into VBA conditional formatting?

The rules that I have set up work as intended, but due to the need to merge and unmerge cells on the sheet, NON-VBA conditional formatting updates the "applies to" range and creates additional conditional formatting rules by itself. I am hoping that by removing the NON-VBA conditional formatting and having it done through VBA will eliminate the rules being changed by excel.

Conditional formatting applies to =$A$1:$BJ$105
Use a formula to determine which cells to format =IF(VLOOKUP(A1,'ITEM LIST'!$D:$G,4,0)='Data Validations'!$D$13,1,0)
Set background color to any value you choose for now (I can change the color value later)
Sheet name Hot Line Map
There are 20 different conditional formatting rules that are identical to the above, but have a different value for the red highlight.

I also need to have the above 20 rules apply to
Sheet name Walkin Map
These 20 rules are identical to the above formula except for the value highlighted in purple


Again, I have all of this working in NON-VBA, I am just looking to have it work through VBA.

Any questions please let me know.
Thanks
Kevin
 

Some videos you may like

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Watch MrExcel Video

Forum statistics

Threads
1,108,803
Messages
5,524,970
Members
409,612
Latest member
Jagadeeswaran Stalin

This Week's Hot Topics

Top