Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Barabbas Levi   on Nov 12 In MS Office Category.

  
Question Answered By: Jawwad Akram   on Nov 12

Try this

paste this macro  into the VBA editor

Option Explicit

Sub lineupnumbers()


' Macro by David Grugeon
'
Dim X
Dim Y

X = Selection.Row
Y = Selection.Rows.Count
Y = Y + X - 1
For X = X To Y
If Range("A" & X) <> Range("B" & X) Then
Range(("B" & X), ("C" & X)).Select
Selection.Insert Shift:=xlDown
End If
Next X
End Sub

Then select all the rows with numbers  in column  A
Then run the macro

Share: