Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 144
Default IN EXCEL, HOW DO I KEEP TWO LINES OF DATA TOGETHER WHEN SORTING (N

In a data base, I have customer information and blank lines in between to
separate the data. I want to keep the blank lines under the customer
information to make the data base easier to read, how do I do this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default IN EXCEL, HOW DO I KEEP TWO LINES OF DATA TOGETHER WHEN SORTING (N

One easy way - if there are not too many entries - is to repeat the entry in
the sort column on the blank line in white text.
Ron

"Cheryl" wrote:

In a data base, I have customer information and blank lines in between to
separate the data. I want to keep the blank lines under the customer
information to make the data base easier to read, how do I do this?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,071
Default IN EXCEL, HOW DO I KEEP TWO LINES OF DATA TOGETHER WHEN SORTING (N

Cheryl
This little macro will do that. As written, this macro sorts all data
from A2 down to the last entry in Column A, 7 columns wide. This will
remove all blank rows. This macro will then insert blank rows like you
want. Another way to get what you want, i.e. easier to read, is to have no
blank rows but color alternate rows. HTH Otto
Sub SortAll()
Dim rColA As Range
Dim c As Long
Set rColA = Range("A2", Range("A" & Rows.Count).End(xlUp))
rColA.Resize(, 7).Sort Key1:=Range("A2"), Order1:=xlAscending,
Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Set rColA = Range("A2", Range("A" & Rows.Count).End(xlUp))
For c = rColA.Count To 1 Step -1
rColA(c).Offset(1).EntireRow.Insert
Next c
End Sub

"Cheryl" wrote in message
...
In a data base, I have customer information and blank lines in between to
separate the data. I want to keep the blank lines under the customer
information to make the data base easier to read, how do I do this?


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default IN EXCEL, HOW DO I KEEP TWO LINES OF DATA TOGETHER WHEN SORTING (N

Get rid of the blank lines and simply set the rows to double height.


Gord Dibben MS Excel MVP

On Mon, 11 Jan 2010 14:05:01 -0800, Cheryl
wrote:

In a data base, I have customer information and blank lines in between to
separate the data. I want to keep the blank lines under the customer
information to make the data base easier to read, how do I do this?


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
averaging lines of data at every ten lines MJ Excel Discussion (Misc queries) 5 December 29th 08 03:48 AM
Sorting by line when multiple lines correspond to it? Jonathan Excel Discussion (Misc queries) 3 February 4th 08 06:21 PM
Need to add 2 or more lines of data into a single cell in Excel Susan Excel Discussion (Misc queries) 2 July 31st 07 06:50 AM
Inserting Lines or Copying lines with formulas but without data wnfisba Excel Discussion (Misc queries) 2 August 18th 06 04:41 PM
How do I group multiple lines of excel info for easy sorting ericsayang New Users to Excel 2 January 12th 06 08:06 PM


All times are GMT +1. The time now is 10:59 AM.

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"