Re: $$Excel-Macros$$ Sort VBA Code Modified

2014-07-03 Thread amar takale
Dear Bé Trần Văn Thanks very much for this & noe it open in excel 2003 version also work it. But small issue that VBA code would be copy & paste in sheet module for each column & change column numbers in code & attached button that code every time.IF there are more than 30 cloumn then 30 times VB

Re: $$Excel-Macros$$ Sort VBA Code Modified

2014-07-01 Thread Lalit Mohan Pandey
Share your workbook in which you are applying this method and let me check why it is not working. On Tuesday, 1 July 2014 11:05:27 UTC+5:30, amar takale wrote: > > Dear lalitji > code not working > > On Tue, Jul 1, 2014 at 8:00 AM, Lalit Mohan Pandey > > wrote: > > I have checked it and it is

Re: $$Excel-Macros$$ Sort VBA Code Modified

2014-07-01 Thread Bé Trần Văn
You change the Sort row here Rows("7:2000") 7: Sort line that begins 2000: Sort to the last line, if greater than 2000 sort pregnancy weight on you instead of here example: Rows("5:32000") You change the Sort column in this line Range("D7") Sort column H Range("H7") Sort column K Range("H7")

Re: $$Excel-Macros$$ Sort VBA Code Modified

2014-06-30 Thread amar takale
Dear Bé Trần Văn Code is good but required data sort each column but code sort data on basis of D7 cell only ,if i want sort it another column then need to change cell numbers each time then work done in some time. Can we give as header row No 6 as ascending & descending then we can sort data with

Re: $$Excel-Macros$$ Sort VBA Code Modified

2014-06-30 Thread amar takale
Dear lalitji code not working On Tue, Jul 1, 2014 at 8:00 AM, Lalit Mohan Pandey wrote: > I have checked it and it is working fine but give a try to this code: > > Sub SECEPSDES() > > With ThisWorkbook.Worksheets("Sector Valn") > .Sort.SortFields.Clear > .Range("A6:U21").Sort

Re: $$Excel-Macros$$ Sort VBA Code Modified

2014-06-30 Thread Lalit Mohan Pandey
I have checked it and it is working fine but give a try to this code: *Sub SECEPSDES()* *With ThisWorkbook.Worksheets("Sector Valn")* *.Sort.SortFields.Clear* *.Range("A6:U21").Sort Key1:=.Range("E7:E21"), Order1:=xlDescending, Header:=xlYes* *End With* *End Sub*

Re: $$Excel-Macros$$ Sort VBA Code Modified

2014-06-30 Thread Bé Trần Văn
To use the code for another sheet, you add 2 lines of code on the start and end Module. With ActiveWorkbook.Worksheets("Sheet1") End With Sheet1 is the name you need to reference sheet. For example: Sub SortAscendingD_Sheet1() With ActiveWorkbook.Worksheets("Sheet1") Rows("7:2000").Select

Re: $$Excel-Macros$$ Sort VBA Code Modified

2014-06-29 Thread amar takale
Dear latit mohan, when i use above code which you provide show error "object does not support this property or method" in excel.Pls give me proper guidance Regards Amar On Mon, Jun 30, 2014 at 10:17 AM, amar takale wrote: > Dear Bé Trần Văn > > Thanks very much sir. but i ask you small is

Re: $$Excel-Macros$$ Sort VBA Code Modified

2014-06-29 Thread amar takale
Dear Bé Trần Văn Thanks very much sir. but i ask you small issue can we use one code to all filed like lalit mohanji code.I use this code but erroe show "object does not support this property or method" Thanks once again Regards Amar On Sat, Jun 28, 2014 at 3:34 PM, Bé Trần Văn wrote

Re: $$Excel-Macros$$ Sort VBA Code Modified

2014-06-27 Thread Lalit Mohan Pandey
Yes it will work in excel 2003 and above On Friday, 27 June 2014 15:31:54 UTC+5:30, amar takale wrote: > > Dear Lalit Mohan > > Then it code not work in excel 2003? > > On Fri, Jun 27, 2014 at 3:24 PM, Lalit Mohan Pandey > > wrote: > > change your code as i have changed it: > > > > Sub SECEP

Re: $$Excel-Macros$$ Sort VBA Code Modified

2014-06-27 Thread amar takale
Dear Lalit Mohan Then it code not work in excel 2003? On Fri, Jun 27, 2014 at 3:24 PM, Lalit Mohan Pandey wrote: > change your code as i have changed it: > > Sub SECEPSDES() > > With ActiveWorkbook.Worksheets("Sector Valn") > .Sort.SortFields.Clear > .Range("A6:U21").Sort Key

Re: $$Excel-Macros$$ Sort VBA Code Modified

2014-06-27 Thread Lalit Mohan Pandey
change your code as i have changed it: *Sub SECEPSDES()* *With ActiveWorkbook.Worksheets("Sector Valn")* *.Sort.SortFields.Clear* *.Range("A6:U21").Sort Key1:=.Range("E7:E21"), Order1:=xlDescending, Header:=xlYes* *End With* *End Sub* *Sub SECEPSASC()* *

Re: $$Excel-Macros$$ Sort VBA Code Modified

2014-06-26 Thread amar takale
Dear all pls help me on this topic. regards amar On Thu, Jun 26, 2014 at 1:21 PM, amar takale wrote: > Dear Experts > > I have below attached excel which open in excel 2007 then sort VBA > code work perfect but when it open in excel 2003 then show error.So > pls guide me about it error & work a