![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 10:52 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com