I have a Range defined as
Set myRange=Range("$E$10,$G$10,$I$10")
The values in these cells are -1, -1.2, 1 When I iterate over the range I get the values printed in order of -1, -1.2, 1
I would like sort this range so that when I iterate over the range I would see: -1.2, -1, 1
I do not want to reorganize these cells in the actual worksheet.
I am basically trying to mimic a sort function in a normal programming language, but for Excel range, where I expect the 'cells' to be re-arranged within the range data structure
I have tried a naive
myRange.Sort key1:=myRange.Item(1, 1), order1:=xlAscending, Header:=xlNo
But it does not do anything
