Hi Guys im after some code that can add a border to the end of the change in data but defined by a specific column.
so in theory it would open a message box to determine the column to look down and at the end of each change in data insert a border.
The border would be from A:N for example
I've got some code that work for a defined range but i want a msg box adding to it
any help you could give would be awesome!
so in theory it would open a message box to determine the column to look down and at the end of each change in data insert a border.
The border would be from A:N for example
I've got some code that work for a defined range but i want a msg box adding to it
Code:
Sub AddBorderLineWhenValueChanges_PO()'add border
Application.ScreenUpdating = False
Dim LastRow As Long
Dim xrg As Range
LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
For Each xrg In Range("AC2:AC" & LastRow)
If xrg <> xrg.Offset(1, 0) Then
Range("A" & xrg.Row & ":N" & xrg.Row).Borders(xlEdgeBottom).LineStyle = xlDouble
End If
Next xrg
Application.ScreenUpdating = True
End Sub
any help you could give would be awesome!