how to seperate cells with equal blank cells
yaling
Are you up for some VBA macro?
The following will insert a blank row at each change in value in Column A
Sub InsertRow_At_Change()
Dim i As Long
With Application
.Calculation = xlManual
.ScreenUpdating = False
End With
For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
If Cells(i - 1, 1) < Cells(i, 1) Then _
Cells(i, 1).Resize(1, 1).EntireRow.Insert
'change .Resize(1, 1) to (2, 1) for two blank rows.
Next i
With Application
.Calculation = xlAutomatic
.ScreenUpdating = True
End With
End Sub
Gord Dibben MS Excel MVP
On Wed, 9 May 2007 16:50:01 -0700, yaling
wrote:
hello,
i have a company name list with thousands of companies. they are in one
colume and followed one by one. i need them to be seperated with equal blank
cells between each two companies. Is there any efficient way to get the job
done?
thanks,
|