Solved

VBA Sort group

Posted on 2015-02-04
3
414 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
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

831 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