Hello Excel Masters!
I am creating a Template that will be used by many people, I am noticing (during my Alpha testing) that there is lag while entering data. Additionally, the users will have to insert rows in the existing fields and when that happens I am noticing some Conditional Formats issues that are happening. I have a lot of Conditional Formats and in an effort to reduce the lag and another issues I am thinking that having most of my Conditional Formatting in VBA will help.
The first thing I am trying to accomplish is if a cell in G10:G900 range is =1999 it will come out to a light blue (as well as any cell to the right (H10:AA900)). Best I can tell the command should look something like the below, but clearly I am missing something as it is not working:
Below is the Conditional Formatting Rule.
And below is the above working in excel.
Thank you in advance,
-Aaron
I am creating a Template that will be used by many people, I am noticing (during my Alpha testing) that there is lag while entering data. Additionally, the users will have to insert rows in the existing fields and when that happens I am noticing some Conditional Formats issues that are happening. I have a lot of Conditional Formats and in an effort to reduce the lag and another issues I am thinking that having most of my Conditional Formatting in VBA will help.
The first thing I am trying to accomplish is if a cell in G10:G900 range is =1999 it will come out to a light blue (as well as any cell to the right (H10:AA900)). Best I can tell the command should look something like the below, but clearly I am missing something as it is not working:
VBA Code:
Sub MultipleConditionalFormattingExample()
Dim MyRange As Range
'Create range object
Set MyRange = Range("H10:AA900")
'Delete previous conditional formats
MyRange.FormatConditions.Delete
MyRange.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:=G10: G900 = 1999 'ultimately this will be any year ending in an odd number
MyRange.FormatConditions(1).Interior.Color = RGB(189, 215, 238)
End Sub
Below is the Conditional Formatting Rule.
And below is the above working in excel.
Thank you in advance,
-Aaron
Last edited by a moderator: