OK, try this.
I fixed some other little problems that were nagging me as well. This will update the boarders as you enter data in the table as you update the week No. and the Quarters Column in the B column. If you want it to update from other columns let me know.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim start As Range
Dim finish As Range
Application.ScreenUpdating = 0
a = Range("B2").CurrentRegion
'If Not Intersect(Target, Range("B:M")) Is Nothing Then
Cells.Borders.LineStyle = 0
Set start = Range("C2")
Set finish = Range("C" & Cells(start.Row, 3).End(xlDown).Row)
For j = 1 To 1000
With Range(Cells(start.Row, 2), Cells(finish.Row - 1, 13))
For i = 7 To 11
.Borders(i).LineStyle = 1
Next i
End With
Set start = Range("C" & finish.Row)
If Cells(start.Row, 3).End(xlDown).Row <= UBound(a) Then
Set finish = Range("C" & Cells(start.Row, 3).End(xlDown).Row)
ElseIf y = 1 Then
GoTo extsub
Else
Set finish = Range("C" & Cells(Rows.Count, 2).End(xlUp).Row + 1): y = 1
End If
Next
' End If
extsub:
Application.ScreenUpdating = 1
End Sub
Bookmarks