Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Sorting by rows with differing numbers of cell entries

I'm trying to sort each row. Each contains differing numbers of cell entries,
anywhere from 1 to 24. I've done a custom sort by selecting only the cells
containing data on each row then custom sorting etc, but I have over 2,300
individual rows to sort.
I also have problems with the blank cells. If I highlight a whole row they
seem to get placed first in the sort on each row.

The data in each cell starts with numbers like this: 01, 02, 03, 04, etc
with an author's name after, eg. 06 SMITH DM. It's the order of authors for
academic texts, so order is vital. All cells are formatted as numbers.
Hope someone can help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Sorting by rows with differing numbers of cell entries

If you haven't tried Filtering the information, give it a try. Under Data,
select the column to filter, choose Autofilter, use the drop down arrow to
get a list of data to sort. It should also eliminate the blank cells.

"DayleMSCU" wrote:

I'm trying to sort each row. Each contains differing numbers of cell entries,
anywhere from 1 to 24. I've done a custom sort by selecting only the cells
containing data on each row then custom sorting etc, but I have over 2,300
individual rows to sort.
I also have problems with the blank cells. If I highlight a whole row they
seem to get placed first in the sort on each row.

The data in each cell starts with numbers like this: 01, 02, 03, 04, etc
with an author's name after, eg. 06 SMITH DM. It's the order of authors for
academic texts, so order is vital. All cells are formatted as numbers.
Hope someone can help.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,549
Default Sorting by rows with differing numbers of cell entries


The "blank" cells may actually have something in them that brings them to the top.
They may contain invisible formatting characters or empty text "" (as the result of a formula).
Data from a foreign source (not you) should be cleaned before trying to work with it.

To automate the sorting of multiple individual rows (across) you will need to use a
macro or a commercial sorting utility.
--
Jim Cone
Portland, Oregon USA
)
3 week free trial of "Special Sort" - just ask for it.




"DayleMSCU"
wrote in message ...
I'm trying to sort each row. Each contains differing numbers of cell entries,
anywhere from 1 to 24. I've done a custom sort by selecting only the cells
containing data on each row then custom sorting etc, but I have over 2,300
individual rows to sort.
I also have problems with the blank cells. If I highlight a whole row they
seem to get placed first in the sort on each row.

The data in each cell starts with numbers like this: 01, 02, 03, 04, etc
with an author's name after, eg. 06 SMITH DM. It's the order of authors for
academic texts, so order is vital. All cells are formatted as numbers.
Hope someone can help.
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Sorting by rows with differing numbers of cell entries

06 SMITH DM in a cell cannot possibly be formatted as a number.

If you want a macro to sort across multiple rows here's one from Tom Ogilvy

Since your data is text, you may not get the sort result you want.

Sub SortRows()
'Tom Ogilvy macro
Dim R As Long
Dim lRow As Long

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
lRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row

'Make the r = 1 whatever the first row of data you want to sort on is.
'The Cells(r, 1) means your data starts in Col 1 or Col A - adjust as
'necessary
'The resize(1, 7) expands the range to 1 cell deep by 7 cells wide

For R = 1 To lRow
With Cells(R, 1).Resize(1, 7)
.Sort Key1:=Cells(R, 2), Order1:=xlAscending, Header:=xlGuess, _
Orientation:=xlLeftToRight, DataOption1:=xlSortNormal
End With
Next R

Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic

End Sub


Gord Dibben MS Excel MVP

On Tue, 16 Mar 2010 18:50:01 -0700, DayleMSCU
wrote:

I'm trying to sort each row. Each contains differing numbers of cell entries,
anywhere from 1 to 24. I've done a custom sort by selecting only the cells
containing data on each row then custom sorting etc, but I have over 2,300
individual rows to sort.
I also have problems with the blank cells. If I highlight a whole row they
seem to get placed first in the sort on each row.

The data in each cell starts with numbers like this: 01, 02, 03, 04, etc
with an author's name after, eg. 06 SMITH DM. It's the order of authors for
academic texts, so order is vital. All cells are formatted as numbers.
Hope someone can help.


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
concatenate formula for rows with differing amount of columns tommykraz Excel Discussion (Misc queries) 3 June 18th 08 11:21 PM
Combine Multiple Entries with differing amounts of entries Katie Excel Worksheet Functions 2 November 28th 07 09:53 PM
Sorting high numbers from low numbers between two rows scotty New Users to Excel 7 February 12th 07 09:38 PM
Selecting rows based on cell entries m.cain Excel Discussion (Misc queries) 2 March 24th 06 10:46 AM
Sorting numbers with differing numbers of digits Trudy Excel Discussion (Misc queries) 5 March 4th 06 12:31 PM


All times are GMT +1. The time now is 04:11 AM.

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

About Us

"It's about Microsoft Excel"