How to insert a row in a column to match data in another column

Super_Dave

New Member
Joined
Nov 29, 2023
Messages
6
Office Version
  1. 365
Platform
  1. Windows
I have a column of road names with no rows in between and another column with same data with rows between the data. How do i get them to match up with r click insert?
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Could you provide a small sample of your data using the XL2BB add in? A before and after would be ideal.
Could not get the XL2BB to work.
Hill DriveHill DriveHILL DR
Hill Side DriveHill Side DriveHILL SIDE DR
Hillcrest RoadHillcrest RoadHILLCREST RD
Hillside Drive (Formerly: Lamar Taylor Road)Hillside DriveHILLSIDE DR
Hilltop DriveHilltop DriveHILLTOP DR
Hillwood Lane
Hilton RoadHillwood LaneHILLWOOD LN
Hinds Road
Hinton RoadHilton RoadHILTON RD
Hodge Road
Hodges McCullum RoadHinds RoadHINES RD
 
Upvote 0
So is the first column in your image column A? And is that the column you want to change to look like/align with (presumably) column B?
 
Upvote 0
In your original post you said they contained the same data
another column with same data
but I notice that Hillside Drive is different in both columns? If the values in column B take precedence then you could simply copy column B & paste over column A. If that's not what you want, then you're looking at a VBA solution.
 
Upvote 0
In your original post you said they contained the same data

but I notice that Hillside Drive is different in both columns? If the values in column B take precedence then you could simply copy column B & paste over column A. If that's not what you want, then you're looking at a VBA solution.
Column A is the new updated data and column B is the old data. I am trying to insert rows for column A data will directly next to Column B data.
 
Upvote 0
OK, please try the following code in a standard module on a copy of your workbook. Only run it once!
VBA Code:
Sub Add_Blanks()
    Dim c As Range
    For Each c In Range("B2", Cells(Rows.Count, "B").End(xlUp))
        If c = "" Then c.Offset(, -1).Insert xlShiftDown
    Next c
End Sub
 
Upvote 0
OK, please try the following code in a standard module on a copy of your workbook. Only run it once!
VBA Code:
Sub Add_Blanks()
    Dim c As Range
    For Each c In Range("B2", Cells(Rows.Count, "B").End(xlUp))
        If c = "" Then c.Offset(, -1).Insert xlShiftDown
    Next c
End Sub
Did not work
 
Upvote 0
OK, I can't guess how your sheet actually is actually structured, and given that you can't get the XL2BB to work, could you share your workbook via Google Drive, Dropbox or similar file sharing platform?
 
Upvote 0

Forum statistics

Threads
1,215,103
Messages
6,123,103
Members
449,096
Latest member
provoking

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top