I have to copy / paste and change a few thousand items and i want to get a macro to do this. I have recorded what i am doing 10 times as an example. I am increasing the value by one when i make the replacement.

I need a macro to paste five rows from A to U and then change the value by one.


Thank you in advance


Range("A1:U5").Select
    Selection.Copy
    Range("A6").Select
    ActiveSheet.Paste
    Selection.Replace What:="1", Replacement:="2", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
    Range("A11").Select
    ActiveSheet.Paste
    Selection.Replace What:="1", Replacement:="3", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
    Range("A16").Select
    ActiveSheet.Paste
    Selection.Replace What:="1", Replacement:="4", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
    Range("A21").Select
    ActiveSheet.Paste
    Selection.Replace What:="1", Replacement:="5", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
    Range("A26").Select
    ActiveSheet.Paste
    Selection.Replace What:="1", Replacement:="6", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
    Range("A31").Select
    ActiveSheet.Paste
    Selection.Replace What:="1", Replacement:="7", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
    Range("A36").Select
    ActiveSheet.Paste
    Selection.Replace What:="1", Replacement:="8", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
    Range("A41").Select
    ActiveSheet.Paste
    Selection.Replace What:="1", Replacement:="9", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
    Range("A46").Select
    ActiveSheet.Paste
    Selection.Replace What:="1", Replacement:="10", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
End Sub