Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
sort a range
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
sort a range
Hi
try to record a macro whild applying your sort criteria manually -- Regards Frank Kabel Frankfurt, Germany Maileen wrote: 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
sort a range
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
formula to sort a range so that it matches the exact rows of a column that is outside that range? | Excel Discussion (Misc queries) | |||
Can I sort by Range Name? | Excel Discussion (Misc queries) | |||
Sort range changes during sort | Excel Discussion (Misc queries) | |||
Sort a Range | Excel Discussion (Misc queries) | |||
Range.Sort in VBA | Excel Programming |