Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default Sort Problem

This isn't really a programming problem, but it is causing my program not
to function correctly.

I have two worksheets in the same workbook which each have a column with
the same data. The data looks like:
03-01-015
03-02-192
03A-01-099
04-02-022
etc.

Not only is the data in the two columns the same, the formats are the same.
I have tried both general and text formats.

If I sort each sheet on this column by clicking on Data/Sort... the two
worksheets are sorted differently. One sheet will be sorted as shown above
while the other will be:
03-01-015
03A-01-099
03-02-192
04-02-022
etc.

All sort parameters are the same in both sorts. There is no VBA code
associated with either page.

What could be causing the difference?

How can I fix it?


Many thanks.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default Sort Problem

Right now, with the columns formated as "Text",
TypeName(Range("A1").value) = "String" in both worksheets
IsNumber is, of course, FALSE, in both cases.

These items are not in a valid number format.


On Thu, 12 May 2005 19:43:25 -0500, Dave Peterson
wrote:

Maybe some of the "numbers" are really numbers formatted to show the dash. And
other numbers are really text?

=isnumber(a1) and drag down (in both sheets) and compare the results.

wrote:

This isn't really a programming problem, but it is causing my program not
to function correctly.

I have two worksheets in the same workbook which each have a column with
the same data. The data looks like:
03-01-015
03-02-192
03A-01-099
04-02-022
etc.

Not only is the data in the two columns the same, the formats are the same.
I have tried both general and text formats.

If I sort each sheet on this column by clicking on Data/Sort... the two
worksheets are sorted differently. One sheet will be sorted as shown above
while the other will be:
03-01-015
03A-01-099
03-02-192
04-02-022
etc.

All sort parameters are the same in both sorts. There is no VBA code
associated with either page.

What could be causing the difference?

How can I fix it?

Many thanks.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default Sort Problem

One further note:

The data are real estate parcel numbers. If:
i is the row of a parcel number in Sheet1, and
j is the row of the same parcel number in Sheet2
(i and j are not the same due to the sorting problem)
then:
Range("Sheet1!A" & i)=Range("Sheet2!A" & j) is TRUE
in every case, yet the sort order is different!
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Sort Problem

Are both lists values or formulas?

if they're simple formulas that point to another sheet, then sorting that won't
work.

wrote:

One further note:

The data are real estate parcel numbers. If:
i is the row of a parcel number in Sheet1, and
j is the row of the same parcel number in Sheet2
(i and j are not the same due to the sorting problem)
then:
Range("Sheet1!A" ? i)=Range("Sheet2!A" ? j) is TRUE
in every case, yet the sort order is different!


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default Sort Problem

Both lists are values, either text or general format - I've tried both

On Fri, 13 May 2005 10:01:27 -0500, Dave Peterson
wrote:

Are both lists values or formulas?

if they're simple formulas that point to another sheet, then sorting that won't
work.

wrote:

One further note:

The data are real estate parcel numbers. If:
i is the row of a parcel number in Sheet1, and
j is the row of the same parcel number in Sheet2
(i and j are not the same due to the sorting problem)
then:
Range("Sheet1!A" ? i)=Range("Sheet2!A" ? j) is TRUE
in every case, yet the sort order is different!


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
Sort Problem Abdul Shakeel Excel Discussion (Misc queries) 0 February 7th 10 12:22 PM
sort problem cindy Excel Worksheet Functions 0 October 2nd 07 02:08 AM
Sort problem spfas Excel Discussion (Misc queries) 2 December 21st 06 08:25 PM
Sort Problem jdb Excel Discussion (Misc queries) 1 January 10th 05 11:05 PM
sort problem CG Rosén Excel Programming 2 November 30th 04 09:59 PM


All times are GMT +1. The time now is 11:29 PM.

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"