PDA

View Full Version : Sort two columns - not working



gonen
10-03-2013, 09:39 PM
Hi

I am having some trouble to sort by two columns.
The columns are filled with Hebrew characters.

When I sort by one of the columns, sort results are OK
But when I sort by two levels - The sort results are by the first level only, but not by the second level.

Any idea ?

Problem exists when I sort in both ways:
when I sort normally (clicking Data/Sort....) and also when I sort by running VBA macro as:



Rows(First_Student_Row & ":" & Rng_to).Select
Selection.Sort Key1:=Range(Sincol & First_Student_Row), Order1:=xlAscending, Key2:=Range(Name_Col & First_Student_Row) _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _
:=xlSortNormal



Thanbks for your help !!!!

patel
10-04-2013, 01:14 PM
If you use ranges names we can not check your code, attach please your file

gonen
10-04-2013, 10:16 PM
If you use ranges names we can not check your code, attach please your file


Not sure you will be able to understand/see Hebrew on your machine.



Its not the code. It behaves the same with online 'regular' data sort (not via my macro)

I guess it has something to do with RTL languages like Hebrew...



Any idea ?

patel
10-05-2013, 01:16 AM
you can fill the columns with numbers instead of Hebrew words and attach it

gonen
10-06-2013, 04:38 AM
my fault. !!!!
it works perfect. thanks