Forum Discussion
SueDuff
Jul 24, 2020Copper Contributor
Combine two columns into one by inserting a row.
Hi, I am trying to combine two columns into one. Column F has the product sold and column G has the postage. I would like to know if it is possible for the amount from column G to be moved to column ...
HansVogelaar
Jul 24, 2020MVP
Here is a macro:
Sub InsertAndMove()
Dim r As Long
Dim m As Long
Application.ScreenUpdating = False
m = Range("F" & Rows.Count).End(xlUp).Row
For r = m To 2 Step -1
Range("F" & r + 1).Insert Shift:=xlShiftDown
Range("F" & r + 1).Value = Range("G" & r).Value
Range("G" & r).Clear
Next r
Application.ScreenUpdating = True
End Sub
If you want to insert an entire row instead of only a cell in column G, change the line
Range("F" & r + 1).Insert Shift:=xlShiftDown
to
Range("F" & r + 1).EntireRow.Insert Shift:=xlShiftDown
SueDuff
Jul 24, 2020Copper Contributor
HansVogelaar I will give it a try, thank you.