Attribute VB_Name = "testcellborder2" Sub ƒeƒXƒg() With Range("B2:C3") .Borders(xlEdgeTop).LineStyle = xlContinuous .Borders(xlEdgeBottom).LineStyle = xlDash .Borders(xlEdgeLeft).LineStyle = xlDashDot .Borders(xlEdgeRight).LineStyle = xlDouble End With With Range("C3:E7") .Borders(xlEdgeTop).LineStyle = xlContinuous .Borders(xlEdgeTop).Weight = xlHairline .Borders(xlEdgeBottom).LineStyle = xlContinuous .Borders(xlEdgeBottom).Weight = xlThin .Borders(xlEdgeLeft).LineStyle = xlContinuous .Borders(xlEdgeLeft).Weight = xlMedium .Borders(xlEdgeRight).LineStyle = xlContinuous .Borders(xlEdgeRight).Weight = xlThick End With End Sub