1

Suppose I want to have a list of item as below

arr["john"] = 40
arr["mark"] = 12
arr["clark"] = 53
arr["sam"] = 23

Now I want to sort them depending on the values as below

arr["clark"] = 53
arr["john"] = 40
arr["sam"] = 23
arr["mark"] = 12

How can I do this?

  • 1
    There is not a lot of difference between VBA and VBScript http://stackoverflow.com/questions/268648/how-do-i-sort-arrays-using-vbscript – Fionnuala Jul 08 '15 at 22:31

1 Answers1

0

You could use a Dictionary from the Microsoft Scripting Runtime library:

Dictionary in VBA

Sorting a Dictionary

Community
  • 1
  • 1
Gustav
  • 53,498
  • 7
  • 29
  • 55