Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem sorting worksheet after pasting several Word txt documents

Status
Not open for further replies.

gking1937

Programmer
Dec 9, 2002
23
US
Using Excel 2000 - pasted .txt documnets from Microsoft Word into an Excel spreadsheet. After pasting data twice from two different Word documents, the sort A>Z function worked fine. After pasting a third time from another Word document the data is "segmented" into two sections. Each section will sort properly, but the entire spreadsheet will not sort. One "section" is made up of rows 1-58 and the second section contains rows 59-315.

I'm not understanding why the entire spreadsheet will not sort.

Thanks for any help. George King
 



Hi,

When you Data > Sort..., what RANGE is selected PRIOR TO hitting the OK button?

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Skip, Thanks for your response. When I do Data > Sort, it does not show a range. (Version 2000) I seareched Help for Range and did not find it. Maybe my version does not have the range feature?
 



Maybe its a difference between 2000 and 2003, but Excel SELECTS the range that will be sorted, prior to executing the sort. Includes or Excludes the heading, for instance.

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 


What happens if you...
[tt]
1. select a heading in a column that is contiguous thru the entire table.

2. Hit the END key.

3. Hit the DOWN ARROW key
[/tt]


Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
It does give an option to include or exclude the heading. I actually removed the heading from the spreadsheet and it still sorts in two sections.

Any other ideas?
 



Last question above.

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
I just tried cutting rows 1-58 and pasting them back in at the bottom of the worksheet. Still didn't work. Puzzling!
 




I did not say anything about SORTING.

Just END then DOWN ARROW.

Tell me what happens.

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 



and you have no hidden rows?

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
I don't think I have hidden rows - dis'n do anything to hide any. I think I'll just start over with a new worksheet and paste the docs back in.
 
You won't see what range Excel has selected when you do a sort. But if you undo ([Ctrl]+[z]) then the range will be selected. You can scroll down (without clicking on any cells) to see if the entire range is being selected or if it stops at row 58.

What you're describing is the expected behavior if there is an empty row between the two data chunks, as Excel will only automatically pick the current contiguous range when you press a sort button.

So, you're sure there is there is data in row numbers 57, 58 and 59?

[tt][blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
Ctrl-Z shows that all 315 rows are selected. And there is data in 57,58,59. No blank rows. I wonder if there is a hidden row at 60? How would I unhide it if it exists?
 
The easiest way to tell will be to look for a break in the number sequence going down the left-hand side. If row 60 is hidden, then Excel will display rows 58, 59, 61, 62....

60 just won't be there.

And since you know just where the two chunks of data are breaking, it should be easy to look for any missing row numbers.

[tt][blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
There are no missing row numbers. Thanks for your help
 
Well, then, I'd suggest that Excel is sorting properly.

What kind of data is in the column you're sorting on? Perhaps some cells have leading spaces causing them to be sorted as text instead of numbers.

If you can't find a problem, Can you copy and paste a few of each type of cell here (a few that are sorting as expected and a few that are not)?

[tt][blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
Well, I got it to work by importing the three text documents into three separate spreadsheets, then copying and pasting data from two of the spreadsheets into the third. Don't know why the other way didn't work, but am glad to be over that hurdle

I really appreciate all the help and suggestions from this forum.

George
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top