Maileen,
The key1 range must be in the range that is sorted. So, use
either
Range("A1:B10").Sort(Key1:=Range("A1")), Header:=True
or
Range("A2:B10").Sort(Key1:=Range("A2"))
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Maileen" wrote in message
...
Hi,
I have a table where A1 and B1 contains respectively "Software"
and "Amount".
I would like to sort range (A2:B10) based on ascending sorting
of Software.
I tried several things with
range("A2:B10").Sort(Key1:=Range("A1")) but nothing works...
could you help me please ?
thx,
Maileen