LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Sort Failing on Some Data

The following failed to sort just two rows (in over 1600) in the data:-

Selection.Sort Key1:=Range("D1"), Order1:=xlAscending, Key2:=Range("E1") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom

I identified the two rows where the data in D and E looked exactly the same
but had remained separated by the sort. Simply typing over the data in E1
resulted in sort working correctly - both were in general format - and the
data was a simple number i.e. 21100. There where links in the sheet but these
weren't linked cells nor were they the result of any calculation / formula.
Preceding the Sort statement above with :-

For Each c In ActiveSheet.Range("A1:V" & LastInRow)
c = c.Value
Next c

Also fixed the problem. Has anybody ever come across anything like this ?? -
it's well weird and if I'd not seen it myself I'd find it hard to believe.



 
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
Data query failing jtrai491 Excel Worksheet Functions 1 November 13th 06 08:10 PM
Pls. reply Sort Data and copy to next coulmn when sort order chang shital shah Excel Programming 1 August 19th 05 02:51 PM
Sort Data and copy to next coulmn when sort data changes shital shah Excel Programming 0 August 18th 05 02:55 PM
Sort Data and copy to next coulmn when sort data changes shital shah Excel Programming 0 August 18th 05 06:48 AM
How do I sort a column of data and have each data row sort accordi Oedalis Excel Discussion (Misc queries) 1 March 17th 05 11:52 PM


All times are GMT +1. The time now is 08:55 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"