Home |
Search |
Today's Posts |
#1
|
|||
|
|||
When sorting info in columns, can I make it insert blank line bet.
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? |
#2
|
|||
|
|||
No. You would need a macro to do that. Post back if this is what you want.
HTH Otto "nanalehew" wrote in message ... 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? |
#3
|
|||
|
|||
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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sorting or aligning columns | Excel Discussion (Misc queries) | |||
Challenging Charting | Charts and Charting in Excel | |||
Sorting rows AND columns | Excel Worksheet Functions | |||
combining 3 columns of same info for a pivot table | Excel Worksheet Functions | |||
Automatic Sorting of a group of columns. | Excel Worksheet Functions |