Asp.net,PL/SQL tips-Tricks for error resolution version 2014,2012,2008,2005,Procedural language,Stored Procedure, computer , excel macro programming,Visual Studio,Film,Musical notations,Indian ,Western Music.

January 14, 2013

How to insert blank row on column change in excel

This is a Macro code in excel to insert blank row on column change in excel.

Dim rval As String, i As Long
rval = Cells(1, 1): i = 2
Do Until Trim(Cells(i, 1) & "") = ""
If Cells(i, 1) <> rval Then
rval = Cells(i, 1)
Rows(i).insert shift:=xlDown
i = i + 1
End If
i = i + 1
Loop
End Sub