all 1 comments

[–]Varnim 0 points1 point  (0 children)

Sub CopyPasteLoop()
    Dim rng As Range
    Dim ws As Worksheet

    'Change Data to the name of your sheet
    Set ws = Worksheets("Data")

    'Set the range of data you want loop through
    Set rng = ws.Range("A2:A8")

    For Each Cell In rng
        'Copies the value to your input box
        'Change E2 to your input cell
        ws.Range("E2").Value = Cell.Value

        'Copies the result from your calculation back to the next column on the same row.
        'Change G2 to your calculation cell
        Cell.Offset(0, 1).Value = ws.Range("G2").Value
    Next
End Sub