ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sort filtered rows in VBA (https://www.excelbanter.com/excel-programming/304733-sort-filtered-rows-vba.html)

RW[_3_]

Sort filtered rows in VBA
 
Is it possible using VBA to sort only the visible rows
after a filter has been applied? I have tried and get a
message saying the command (ie.Sort) cannot be run with
multiple selections.

For me it would be so much more efficient to sort after
filtering, rather then the other way round.

Any help would be greatly appreciated, as would a
straight "No" answer!

Thanks
Rosemary

Tom Ogilvy

Sort filtered rows in VBA
 
select the whole filter range (not just visible rows) or select only a
single cell in the data. Worked fine for me. Only the visible rows were
sorted.

--
Regards,
Tom Ogilvy



"RW" wrote in message
...
Is it possible using VBA to sort only the visible rows
after a filter has been applied? I have tried and get a
message saying the command (ie.Sort) cannot be run with
multiple selections.

For me it would be so much more efficient to sort after
filtering, rather then the other way round.

Any help would be greatly appreciated, as would a
straight "No" answer!

Thanks
Rosemary




RW[_3_]

Sort filtered rows in VBA
 
Thanks Tom. This works fine for me too.
-----Original Message-----
select the whole filter range (not just visible rows) or

select only a
single cell in the data. Worked fine for me. Only the

visible rows were
sorted.

--
Regards,
Tom Ogilvy



"RW" wrote in

message
...
Is it possible using VBA to sort only the visible rows
after a filter has been applied? I have tried and get a
message saying the command (ie.Sort) cannot be run with
multiple selections.

For me it would be so much more efficient to sort after
filtering, rather then the other way round.

Any help would be greatly appreciated, as would a
straight "No" answer!

Thanks
Rosemary



.



All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com