I am trying to get this code to loop through each worksheet...but it doesn't seem to want to!
Thanks for your help
Code:
Sub BorderUsedCells()
For Each ws In Worksheets
For Each rngCell In Range("A5:E25")
If rngCell.Value > "" Then
r = rngCell.Row
c = rngCell.Column
Range(Cells(r, c), Cells(r, c)).Select
With Selection.Borders
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End If
Next
Next ws
End Sub
Thanks for your help