Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob
one way: Sub InsertRows() Dim LastRow As Long Dim i As Long Dim RowDifference As Long LastRow = Range("A65536").End(xlUp).Row For i = LastRow To 2 Step -1 RowDifference = Range("A" & i).Value - Range("A" & i - 1).Value If RowDifference 1 Then Range("A" & i & ":A" & i + RowDifference - 2).EntireRow.Insert End If Next 'i End Sub Regards Trevor "Bob" wrote in message ... This is something I can't quite figure out. I have two columns that I need to check the left column to make sure that all numbers exist. If all do not exist then either add blank cells or the missing numbers. EX: before A B 1 70001 20 2 70002 30 3 70005 20 Ex: after A B 1 70001 20 2 70002 30 3 ; or 70003 4 ; or 70004 5 70005 20 Is this even possible? I would be most appreciative for your help. Any example would be helpful. -- Bob |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sequential numbering | Excel Worksheet Functions | |||
Sequential numbering by 6 | Excel Discussion (Misc queries) | |||
Sequential numbering | Excel Discussion (Misc queries) | |||
PO with sequential numbering with start / end numbering | Excel Discussion (Misc queries) | |||
Sequential numbering | Excel Worksheet Functions |