Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VBA Sort group

Posted on 2015-02-04
3
Medium Priority
?
427 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 46

Accepted Solution

by:
aikimark earned 1000 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 31

Assisted Solution

by:gowflow
gowflow earned 1000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
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…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

610 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