De la siguiente manera lo puede conseguir
presiona alt + f11
Luego inserta un modulo
En el modulo pega estas macro
Sub InsertarFilasConFormato()
Range("a9").Select
Dim numFilas As Long
numFilas = Range("C5").Value
'Validar si el número de filas indicado es superior a cero
If numFilas > 0 Then
'Insertar filas
Rows(ActiveCell.Row & ":" & ActiveCell.Row + numFilas - 1).Insert
End If
Range("a9").Select
If Range("a9") = "" Then
Range("a9") = 1
Range("a10").Select
End If
Do While ActiveCell <> Range("C5")
ActiveCell = ActiveCell.Offset(-1, 0) + 1
If ActiveCell = Range("C5") Then
Range("A7").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
Range("a9").Select
Exit Sub
End If
ActiveCell.Offset(1, 0).Select
Loop
End Sub
Si te silve no olvides valor para cerrar la pregunta