How to install your new code
  1. Copy the Excel VBA code
  2. Select the workbook in which you want to store the Excel VBA code
  3. Press Alt+F11 to open the Visual Basic Editor
  4. Choose Insert > Module
  5. Edit > Paste the macro into the module that appeared
  6. Close the VBEditor
  7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

Sub ManipulateData()
Dim rMyRng_1 As Range, rMyRng_2 As Range, rResult As Range, r As Range, lRws As Long
Dim rPosition As Range

Set rPosition = ActiveCell

Set rMyRng_1 = Application.InputBox("Select The First Range", "Range 1  Req.", , , , , , 8)
Set rMyRng_2 = Application.InputBox("Select The Second Range", "Range 2  Req.", , , , , , 8)

Set rResult = Application.InputBox("Select The Result Cell", "Result Cell  Req.", , , , , , 8)
Set rResult = rResult.Cells(1)

Application.ScreenUpdating = False

With rMyRng_2
    .Copy
    lRws = .Rows.Count
End With

For Each r In rMyRng_1.Cells
    With rResult
        .PasteSpecial xlPasteValues
        .Offset(, 1).Resize(rMyRng_2.Rows.Count).Value = r.Value
        Set rResult = .Offset(rMyRng_2.Rows.Count)
    End With
Next r
    
rPosition.Select
    
Application.ScreenUpdating = True
    
End Sub
To run the Excel VBA code:
  1. Press Alt-F8 to open the macro list
  2. Select a macro in the list
  3. Click the Run button