Try this...with a command button, Change your range as needed, this one is A2:B10000 Private Sub CommandButton2_Click() ActiveWorkbook.Worksheets("Your Worksheet Name").Sort.SortFields.Clear ActiveWorkbook.Worksheets("Your Worksheet Name").Sort.SortFields.Add Key _ :=Range("A2"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _ xlSortNormal With ActiveWorkbook.Worksheets("Your Worksheet Name").Sort .SetRange Range("A2:B10000") .Header = xlNo .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With End Sub
On May 24, 7:44 am, Deepak Rawat <deepakexce...@gmail.com> wrote: > yes Sorting > > > > On Fri, May 20, 2011 at 5:41 PM, STDEV(i) <setiyowati.d...@gmail.com> wrote: > > do you mean SORTING ? > > > Ascending / descending order are parameters of SORTING action > > not Filtering.. > > > CMIIW > > > On Fri, May 20, 2011 at 2:57 PM, Deepak Rawat > > <deepakexce...@gmail.com>wrote: > > >> Hi All > >> I need the simplest VBA code to filter any data in ascending. > >> Regards, > >> Deepak > > > -- > > > ---------------------------------------------------------------------------------- > > Some important links for excel users: > > 1. Follow us on TWITTER for tips tricks and links : > >http://twitter.com/exceldailytip > > 2. Join our LinkedIN group @http://www.linkedin.com/groups?gid=1871310 > > 3. Excel tutorials athttp://www.excel-macros.blogspot.com > > 4. Learn VBA Macros athttp://www.quickvba.blogspot.com > > 5. Excel Tips and Tricks athttp://exceldailytip.blogspot.com > > > To post to this group, send email to excel-macros@googlegroups.com > > > <><><><><><><><><><><><><><><><><><><><><><> > > Like our page on facebook , Just follow below link > >http://www.facebook.com/discussexcel- Hide quoted text - > > - Show quoted text - -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel