Draw cell borders
Hi,
How should I code in Macro Excel 2007, for cells contains with data which selected below with top, bottom, left and right borders.
Sub resolved()
'Range("A2:J1000").Sort Key1:=Columns("D"), Order1:=xlAscending, Key2:=Columns("H"), Order2:=xlAscending
Range("A:A,D:E,G:I").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Columns.AutoFit
End With
Range("B:C,F:F,J:J").Select
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlCenter
.Columns.AutoFit
End With
End Sub
|