View Single Post
  #3   Report Post  
Gord Dibben
 
Posts: n/a
Default

I think a macro after the sort would be the easiest method.

The code below inserts a row at each change of 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
Next i
With Application
.Calculation = xlAutomatic
.ScreenUpdating = True
End With
End Sub

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to ToolMacroMacros.


Gord Dibben Excel MVP

On Fri, 11 Mar 2005 17:23:06 -0800, nanalehew
wrote:

I have a spreadsheet with columns of dollar amounts. Some cells contain
duplicate information. I have sorted the column to group all duplicate
amounts together beginning with the highest dollar amount at the top. I now
want to add a blank line between each "set" of duplicate amounts. Can I do a
sort to make that happen?