billandrew
Well-known Member
- Joined
- Mar 9, 2014
- Messages
- 743
GM All
I am writing this code in VBA to apply a border to a cell if the cell value is "John". Is this the most efficient way to accomplish this task.
Below is the code
Sub add_border()
For x = 1 To 100
If Cells(x, 2) = "John" Then
Cells(x, 2).Borders.Weight = 2.5
Cells(x, 2).Borders.Color = RGB(255, 0, 0)
End If
Next x
End Sub
Thank You...
I am writing this code in VBA to apply a border to a cell if the cell value is "John". Is this the most efficient way to accomplish this task.
Below is the code
Sub add_border()
For x = 1 To 100
If Cells(x, 2) = "John" Then
Cells(x, 2).Borders.Weight = 2.5
Cells(x, 2).Borders.Color = RGB(255, 0, 0)
End If
Next x
End Sub
Thank You...