Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
nanalehew
 
Posts: n/a
Default 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   Report Post  
Otto Moehrbach
 
Posts: n/a
Default

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   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?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting or aligning columns Jeremy Excel Discussion (Misc queries) 5 March 10th 05 11:44 PM
Challenging Charting C TO Charts and Charting in Excel 0 January 17th 05 06:57 PM
Sorting rows AND columns 3D Excel Worksheet Functions 2 January 7th 05 02:15 AM
combining 3 columns of same info for a pivot table Julie Excel Worksheet Functions 0 December 15th 04 03:12 PM
Automatic Sorting of a group of columns. Josh Barbara Excel Worksheet Functions 1 November 15th 04 01:55 AM


All times are GMT +1. The time now is 12:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"