Solved

VBA Sort group

Posted on 2015-02-04
3
418 Views
Last Modified: 2016-02-10
Hello,
Can you please help.
I'm looking for a macro that can sort by count
Please see sample attached.

Note, Number of Rows varies.

Thanks
sample.xlsx
0
Comment
Question by:W.E.B
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 45

Accepted Solution

by:
aikimark earned 250 total points
ID: 40590223
Will this work for you?
    Range("A1:O44").Sort Key1:=Range("I1"), Order1:=xlAscending, Header:= _
        xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
        DataOption1:=xlSortNormal

Open in new window

0
 
LVL 29

Assisted Solution

by:gowflow
gowflow earned 250 total points
ID: 40590644
Easy just don't worry about subtotal select the entire area from A1 to O44
Choose from the Data menu Sort and click on the field Del City if you want them from small to big then choose A to Z else choose Z to A

No need for macro unless if you have already a macro and need to sort all this I would do the following:
 
Usedrange.sort Key1:=range("I1"),order1:=ascending,Header:=xlyes,matchcase:=False

Descending for Z to A

gowflow
0
 

Author Closing Comment

by:W.E.B
ID: 40590728
Thank you.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question