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: 5
Default Comparing Values for Sorting

Dear Colleagues;

How do I sort an array containing the following string values?

I tried using Strcmp function and < comparison to compare each elements,
but the results don't look as I expected. for example if I compare 030814-01
with 030811-02, Strcomp renders a reverse result. But when I paste this
value into a sheet the Sort works ok. So, I'm lost.

Any guidances will be most appreciated.


from this

030814-01
030409-01-R1
030821-01
030731-01
030821-02
030613-01
030613-01R1
030821-02R1
030811-01R1
030823-01
030811-02

to this

030409-01-R1
030613-01
030613-01R1
030731-01
030811-01R1
030811-02
030814-01
030821-01
030821-02
030821-02R1
030823-01

Suk Ho


 
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
Comparing values in columns Sandy Excel Worksheet Functions 2 April 19th 07 09:40 AM
Help with Comparing values and retrieving values in Excel!!!!!! [email protected] Excel Worksheet Functions 1 November 17th 06 12:21 AM
Comparing values between columns only when there are values in bot Mark K Excel Worksheet Functions 1 February 19th 06 06:47 PM
Comparing values Dirk_Bob Excel Discussion (Misc queries) 2 August 24th 05 09:39 PM
comparing two values Jerry Excel Worksheet Functions 2 March 2nd 05 04:34 PM


All times are GMT +1. The time now is 03:31 PM.

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"