Re: $$Excel-Macros$$ Macro to sort data in Ascending/Descending order

2011-01-26 Thread San Pat
Sandeep thanks for your help. Sorry guys for not making it clear first time. Let me explain it again. When I click on the specific cell first time, it should arrange the data in ascending or descending order. Similarly, when I click the same cell again, it should arrange the data in reverse (de

Re: $$Excel-Macros$$ Macro to sort data in Ascending/Descending order

2011-01-26 Thread Sandeep Kumar Maurya
Hi Sandip, Please find the attached file. Feel free to ask further for any query. Regards Sandeep Kumar On Wed, Jan 26, 2011 at 10:41 PM, San Pat wrote: > Hi Ashish, > > Thanks for your help. > > Is there any way I can make it cell specific, assign this macro to > particular cell. > > For exa

Re: $$Excel-Macros$$ Macro to sort data in Ascending/Descending order

2011-01-26 Thread San Pat
Hi Ashish, Thanks for your help. Is there any way I can make it cell specific, assign this macro to particular cell. For example, separate macro for cell A1, B1, C1, D1 etc. I want to put two arrows, up & down (one for Ascending sort and second for Descending sort), in each cell. Regards, Sand

Re: $$Excel-Macros$$ Macro to sort data in Ascending/Descending order

2011-01-26 Thread robinson shahzad
helloo frnds i want to know what is macro and what is the work of it and how we can operate this. thankyou. -- -- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twit

Re: $$Excel-Macros$$ Macro to sort data in Ascending/Descending order

2011-01-26 Thread siti Vi
Why not using available [Sort Ascending / Descending] buttons in Auto Filter ? On 1/26/11, San Pat wrote: > Hi All, > > I am working on a excel with data in many columns. > > I want to add two macro button on each heading to sort data, one for > Ascending sort +and second for Descending sort. >

Re: $$Excel-Macros$$ Macro to sort data in Ascending/Descending order

2011-01-25 Thread ashish koul
Sub sort_ascending() Dim Temp As String Temp = ActiveCell.Address x = Mid(Temp, 2, (InStr(2, Temp, "$") - 2)) If ActiveCell.Column <= 6 Then Sheets(1).Range("a1:f" & Range("a1").End(xlDown).Row).Sort key1:=Sheets(1).Range(x & "1"), order1:=xlAscending, Header:=xlYes End If End Sub Sub sort_des()