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?
 
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?
yes sir
 
Upvote 0

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
When I run the following code on your sample data:
VBA Code:
Sub Add_Blanks()
    Dim c As Range
    For Each c In Range("B1", Cells(Rows.Count, "B").End(xlUp))
        If c = "" And c.Offset(, -1) <> "" Then c.Offset(, -1).Insert xlShiftDown
    Next c
End Sub

It goes from this:
Book1
ABC
1Hill DriveHill DriveHILL DR
2
3Hill Side DriveHill Side DriveHILL SIDE DR
4
5Hillcrest RoadHillcrest RoadHILLCREST RD
6
7
8
9Hillside Drive (Formerly: Lamar Taylor Road)Hillside DriveHILLSIDE DR
10
11Hilltop DriveHilltop DriveHILLTOP DR
12Hillwood Lane
13Hilton RoadHillwood LaneHILLWOOD LN
14Hinds Road
15Hinton RoadHilton RoadHILTON RD
16Hodge Road
17Hodges McCullum RoadHinds RoadHINES RD
Sheet1


to this:
Book1
ABC
1Hill DriveHill DriveHILL DR
2
3Hill Side DriveHill Side DriveHILL SIDE DR
4
5Hillcrest RoadHillcrest RoadHILLCREST RD
6
7
8
9Hillside Drive (Formerly: Lamar Taylor Road)Hillside DriveHILLSIDE DR
10
11Hilltop DriveHilltop DriveHILLTOP DR
12
13Hillwood LaneHillwood LaneHILLWOOD LN
14
15Hilton RoadHilton RoadHILTON RD
16
17Hinds RoadHinds RoadHINES RD
18Hinton Road
19Hodge Road
20Hodges McCullum Road
Sheet1
 
Upvote 0

Forum statistics

Threads
1,215,094
Messages
6,123,069
Members
449,092
Latest member
ipruravindra

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