Try this, I have created this for only MCap column:

*Option Explicit*

*Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As 
Boolean)*
    
*    If Target.Address = "$D$7" Then*
*        Call FilterData*
*        Application.Goto Me.Cells(1, 1)*
*    End If*

*End Sub*

*Sub FilterData()*

*    Dim r As Range*
*    Dim i As Long*
*    Dim ii As Long*
*    Dim k As Long*
    
*    With Sheet1*
*        Set r = .Range("$B$7:$I$29")*
*        i = .Range("D5").Value*
*        ii = .Range("D6").Value*
*        k = 3*
*        With r*
*            If .Resize(1, 1).Offset(, k - 1).ID = "" Then*
*                .Resize(1, 1).Offset(, k - 1).ID = "asc"*
*            End If*
*            On Error Resume Next*
*            .Sort.SortFields.Clear*
*            On Error GoTo -1: On Error GoTo 0: Err.Clear*
*            If .Resize(1, 1).Offset(, k - 1).ID = "asc" Then*
*                .Sort Key1:=.Resize(, 1).Offset(, k - 1), 
Order1:=xlAscending, Header:=xlYes*
*                .Resize(1, 1).Offset(, k - 1).ID = "desc"*
*            ElseIf .Resize(1, 1).Offset(, k - 1).ID = "desc" Then*
*                .Sort Key1:=.Resize(, 1).Offset(, k - 1), 
Order1:=xlDescending, Header:=xlYes*
*                .Resize(1, 1).Offset(, k - 1).ID = "asc"*
*            End If*
*            .AutoFilter*
*            .AutoFilter Field:=3, Criteria1:=">=" & i, Operator:=xlAnd, 
Criteria2:="<=" & ii*
*        End With*
*    End With*

*End Sub*


On Friday, 27 June 2014 15:22:44 UTC+5:30, amar takale wrote:
>
> Dear Lali Mohan 
>
> Exactly i want data by sort based on multiple criteria range. 
>
> Regards 
> Amar 
>
>
> On Fri, Jun 27, 2014 at 3:20 PM, amar takale <amart...@gmail.com 
> <javascript:>> wrote: 
> > Dear Pramod 
> > 
> > First thanks for reply.If you see Raw sheet (Row No 7) cell D7,here 
> > are I double click then mkt cap will sort as per criteria between 1000 
> > to 5000 automatically which show output in output sheet,like this i 
> > will click each criteria Price,Roe... etc. & data sort as per criteria 
> > range in cell E5 & E6,F5 & F6....etc. 
> > 
> > I required for this VBA code to sort data. Only I double click Row 7. 
> > 
> > I hoe you understand my issue 
> > 
> > Regards 
> > Amar 
> > 
> > On Fri, Jun 27, 2014 at 3:02 PM, Pramod Singh <pram...@gmail.com 
> <javascript:>> wrote: 
> >> Not Sure What you are saying. 
> >> 
> >> 
> >> Need more description. 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> On Fri, Jun 27, 2014 at 11:28 AM, amar takale <amart...@gmail.com 
> <javascript:>> wrote: 
> >>> 
> >>> Dear All friends 
> >>> 
> >>> Can anyone suggestion pls? 
> >>> 
> >>> On Wed, Jun 25, 2014 at 12:17 PM, amar takale <amart...@gmail.com 
> <javascript:>> 
> >>> wrote: 
> >>> > Dear Expert team 
> >>> > 
> >>> > I Required code for sort data as per criteria range in between 
> >>> > numbers.PFA with more detailed in sheet. 
> >>> > 
> >>> > Regards 
> >>> > Amar 
> >>> > 
> >>> > -- 
> >>> > Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? 
> >>> > It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum 
> @ 
> >>> > https://www.facebook.com/discussexcel 
> >>> > 
> >>> > FORUM RULES 
> >>> > 
> >>> > 1) Use concise, accurate thread titles. Poor thread titles, like 
> Please 
> >>> > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need 
> Advice will 
> >>> > not get quick attention or may not be answered. 
> >>> > 2) Don't post a question in the thread of another member. 
> >>> > 3) Don't post questions regarding breaking or bypassing any security 
> >>> > measure. 
> >>> > 4) Acknowledge the responses you receive, good or bad. 
> >>> > 5) Jobs posting is not allowed. 
> >>> > 6) Sharing copyrighted material and their links is not allowed. 
> >>> > 
> >>> > NOTE  : Don't ever post confidential data in a workbook. Forum 
> owners 
> >>> > and members are not responsible for any loss. 
> >>> > --- 
> >>> > You received this message because you are subscribed to the Google 
> >>> > Groups "MS EXCEL AND VBA MACROS" group. 
> >>> > To unsubscribe from this group and stop receiving emails from it, 
> send 
> >>> > an email to excel-macros...@googlegroups.com <javascript:>. 
> >>> > To post to this group, send email to excel-...@googlegroups.com 
> <javascript:>. 
> >>> > Visit this group at http://groups.google.com/group/excel-macros. 
> >>> > For more options, visit https://groups.google.com/d/optout. 
> >>> 
> >>> -- 
> >>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? 
> It’s 
> >>> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
> >>> https://www.facebook.com/discussexcel 
> >>> 
> >>> FORUM RULES 
> >>> 
> >>> 1) Use concise, accurate thread titles. Poor thread titles, like 
> Please 
> >>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need 
> Advice will 
> >>> not get quick attention or may not be answered. 
> >>> 2) Don't post a question in the thread of another member. 
> >>> 3) Don't post questions regarding breaking or bypassing any security 
> >>> measure. 
> >>> 4) Acknowledge the responses you receive, good or bad. 
> >>> 5) Jobs posting is not allowed. 
> >>> 6) Sharing copyrighted material and their links is not allowed. 
> >>> 
> >>> NOTE  : Don't ever post confidential data in a workbook. Forum owners 
> and 
> >>> members are not responsible for any loss. 
> >>> --- 
> >>> You received this message because you are subscribed to the Google 
> Groups 
> >>> "MS EXCEL AND VBA MACROS" group. 
> >>> To unsubscribe from this group and stop receiving emails from it, send 
> an 
> >>> email to excel-macros...@googlegroups.com <javascript:>. 
> >>> To post to this group, send email to excel-...@googlegroups.com 
> <javascript:>. 
> >>> Visit this group at http://groups.google.com/group/excel-macros. 
> >>> For more options, visit https://groups.google.com/d/optout. 
> >> 
> >> 
> >> 
> >> 
> >> -- 
> >> PramodSingh 
> >> 
> >> -- 
> >> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? 
> It’s 
> >> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
> >> https://www.facebook.com/discussexcel 
> >> 
> >> FORUM RULES 
> >> 
> >> 1) Use concise, accurate thread titles. Poor thread titles, like Please 
> >> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice 
> will 
> >> not get quick attention or may not be answered. 
> >> 2) Don't post a question in the thread of another member. 
> >> 3) Don't post questions regarding breaking or bypassing any security 
> >> measure. 
> >> 4) Acknowledge the responses you receive, good or bad. 
> >> 5) Jobs posting is not allowed. 
> >> 6) Sharing copyrighted material and their links is not allowed. 
> >> 
> >> NOTE : Don't ever post confidential data in a workbook. Forum owners 
> and 
> >> members are not responsible for any loss. 
> >> --- 
> >> You received this message because you are subscribed to the Google 
> Groups 
> >> "MS EXCEL AND VBA MACROS" group. 
> >> To unsubscribe from this group and stop receiving emails from it, send 
> an 
> >> email to excel-macros...@googlegroups.com <javascript:>. 
> >> To post to this group, send email to excel-...@googlegroups.com 
> <javascript:>. 
> >> Visit this group at http://groups.google.com/group/excel-macros. 
> >> For more options, visit https://groups.google.com/d/optout. 
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to