Sub test() Dim r As String, n As Integer n = InputBox("type number of times to be replicated") r = InputBox("the cells address whose values to be replciated, e.g A2 ") Range(Range(r).Offset(1, 0), Range(r).Offset(n - 1, 0)).EntireRow.Insert Range(r).Copy Range(Range(r).Offset(1, 0), Range(r).Offset(n - 1, 0)) End Sub
Sub test() Dim j As Integer, k As Integer, n As Integer j = Range("A1").End(xlDown).Row k = 1 Do n = InputBox("type number of ADDITIONAL times to be replicated e.g. 2") Range(Cells(k + 1, "A"), Cells(k + n, "A")).EntireRow.Insert Cells(k, "A").Copy Range(Cells(k + 1, "A"), Cells(k + n, "A")) k = k + n + 1 'MsgBox k If Cells(k, "A") = "" Then Exit Do Loop End Sub
My real list contains about 120 lines, And each line should be replicated up to 50 times, but this N (50 times) is constant for all 120 values. It doesn't change. Thanks again!