Hi everyone, I have 2 small problems with macro for selecting rows.
1. The first macro adds a border to the selected row - in this code I would like to add the range in which it is to operate (only within the table) From row 42 to 305.
2. This macro adds a row fill color to me - How do I make a row selection color (from VBA code) overlap an existing fill from conditional formatting? at the moment, it doesn't work with color-filled cells.
Can you help?
1. The first macro adds a border to the selected row - in this code I would like to add the range in which it is to operate (only within the table) From row 42 to 305.
If w > 0 Then
With Rows(w)
.Borders(xlEdgeBottom).LineStyle = xlNone
End With
End If
With Target(1).EntireRow
w = .Row
With .Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.Color = RGB(217, 217, 217)
End With
End With
2. This macro adds a row fill color to me - How do I make a row selection color (from VBA code) overlap an existing fill from conditional formatting? at the moment, it doesn't work with color-filled cells.
Rows("42:305").Interior.ColorIndex = xlNone
If Not Intersect(Target, Rows("42:305")) Is Nothing Then Selection.EntireRow.Interior.Color = RGB(249, 249, 249)
Can you help?