Re: Run macro withing selected cell range
It works great, and this is exactly what I need. Thank you so much for your help!
Re: Run macro withing selected cell range
It works great, and this is exactly what I need. Thank you so much for your help!
Re: Run macro withing selected cell range
One more thing- I'm using it for the table with hidden cells to change the color of every third row of active data.
Re: Run macro withing selected cell range
I understand it and appreciate your help. It works perfectly within any selected data range except that it started to change the colors of the columns in addition to rows. I'm not an expert and don't know which part of the formula changes the columns color. Thanks in advance for any suggestions/hints/direction.
Re: Run macro withing selected cell range
Thank you, sktneer_1,
but this change also highlights the every 3rd column. I need to highlight only every 3rd row, not columns. Any thoughts?
I recorded the following macro for conditional formatting and it works great within the current selected cell range that starts at row 13. What do I need to add/change to run it depending on the selection since the range may vary? Thank you.
Sub Macro1()
'
' Macro1 Macro
'
'
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=IF(COUNTA($A13)=1,MOD(SUBTOTAL(3,$A$13:$A13),3)=0,0)"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.249946592608417
End With
Selection.FormatConditions(1).StopIfTrue = True
End Sub
Display More