Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. '
  2. Dim iRow As Integer, iCol As Integer
  3. Dim oRng As Range
  4.  
  5. Set oRng = Range("a1")
  6.  
  7. iRow = oRng.Row
  8. iCol = oRng.Column
  9.  
  10. Do
  11. '
  12. If Cells(iRow + 1, iCol) <> Cells(iRow, iCol) Then
  13. Cells(iRow + 1, iCol).EntireRow.Insert shift:=xlDown
  14. iRow = iRow + 2
  15. Else
  16. iRow = iRow + 1
  17. End If
  18. '
  19. Loop While Not Cells(iRow, iCol).Text = ""
  20. '
  21.  
  22. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement