Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 44
Default Aouto filter by macro

hi all dears

i need your helps
I use following mocro:

Sheets("Sheet1").Select
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Range("Sheet2!A1").Value

I need to filter(All) by putting a value in cell ("Sheet2!A1").

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Aouto filter by macro

Try this way:
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Sheets("Sheet2").Range("A1").Value

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi all dears

i need your helps
I use following mocro:

Sheets("Sheet1").Select
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Range("Sheet2!A1").Value

I need to filter(All) by putting a value in cell ("Sheet2!A1").

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 44
Default Aouto filter by macro

Thank you for reply
what value i put in cell "A1"?

"Stefi" wrote:

Try this way:
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Sheets("Sheet2").Range("A1").Value

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi all dears

i need your helps
I use following mocro:

Sheets("Sheet1").Select
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Range("Sheet2!A1").Value

I need to filter(All) by putting a value in cell ("Sheet2!A1").

Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 44
Default Aouto filter by macro

HI Stefi

it works well.

any thanks.
nader

"Stefi" wrote:

Try this way:
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Sheets("Sheet2").Range("A1").Value

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi all dears

i need your helps
I use following mocro:

Sheets("Sheet1").Select
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Range("Sheet2!A1").Value

I need to filter(All) by putting a value in cell ("Sheet2!A1").

Thanks.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Aouto filter by macro

You are welcome! Thanks for the feedback!
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi

it works well.

any thanks.
nader

"Stefi" wrote:

Try this way:
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Sheets("Sheet2").Range("A1").Value

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi all dears

i need your helps
I use following mocro:

Sheets("Sheet1").Select
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Range("Sheet2!A1").Value

I need to filter(All) by putting a value in cell ("Sheet2!A1").

Thanks.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 44
Default Aouto filter by macro

HI Stefi
when i filter(all) by your macro it don't show blanks.
is possible it show blanks too?
it is important for me.
thanks

"Stefi" wrote:

You are welcome! Thanks for the feedback!
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi

it works well.

any thanks.
nader

"Stefi" wrote:

Try this way:
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Sheets("Sheet2").Range("A1").Value

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi all dears

i need your helps
I use following mocro:

Sheets("Sheet1").Select
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Range("Sheet2!A1").Value

I need to filter(All) by putting a value in cell ("Sheet2!A1").

Thanks.

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Aouto filter by macro

The VBA equivalent of choosing All from Autofilter dropdown list is:
Selection.AutoFilter Field:=6
It must unhide all cells, including blanks. If you have other problem, give
more details!

Regards,
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi
when i filter(all) by your macro it don't show blanks.
is possible it show blanks too?
it is important for me.
thanks

"Stefi" wrote:

You are welcome! Thanks for the feedback!
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi

it works well.

any thanks.
nader

"Stefi" wrote:

Try this way:
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Sheets("Sheet2").Range("A1").Value

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi all dears

i need your helps
I use following mocro:

Sheets("Sheet1").Select
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Range("Sheet2!A1").Value

I need to filter(All) by putting a value in cell ("Sheet2!A1").

Thanks.

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 44
Default Aouto filter by macro

hi stefi

Description of my question is:

I have a dropdown list like:

toyota
nissan
kia
all

in "sheet2" cell "A1" and i have column F in "sheet1" contain names above.
I want to have a macro, when i choose a value from dropdown list in "sheet2"
"A1" and apply macro, Excell filters in "sheet1" column F by this value and
when i choose "all" value in dropdown list and apply this macro again, it
unhides all cells, including blanks.

kind regards,
nader

"Stefi" wrote:

The VBA equivalent of choosing All from Autofilter dropdown list is:
Selection.AutoFilter Field:=6
It must unhide all cells, including blanks. If you have other problem, give
more details!

Regards,
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi
when i filter(all) by your macro it don't show blanks.
is possible it show blanks too?
it is important for me.
thanks

"Stefi" wrote:

You are welcome! Thanks for the feedback!
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi

it works well.

any thanks.
nader

"Stefi" wrote:

Try this way:
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Sheets("Sheet2").Range("A1").Value

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi all dears

i need your helps
I use following mocro:

Sheets("Sheet1").Select
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Range("Sheet2!A1").Value

I need to filter(All) by putting a value in cell ("Sheet2!A1").

Thanks.

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Aouto filter by macro

Insert this event sub into code window of Sheet2:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "A1" Then Call filtFcol(Target.Value)
End Sub

Insert this sub into a normal module:
Sub filtFcol(filtval)
Worksheets("Sheet1").Select
Columns("F:F").Select
Selection.AutoFilter
If filtval = "all" Then
Selection.AutoFilter Field:=1
Else
Selection.AutoFilter Field:=1, Criteria1:=filtval
End If
End Sub

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi stefi

Description of my question is:

I have a dropdown list like:

toyota
nissan
kia
all

in "sheet2" cell "A1" and i have column F in "sheet1" contain names above.
I want to have a macro, when i choose a value from dropdown list in "sheet2"
"A1" and apply macro, Excell filters in "sheet1" column F by this value and
when i choose "all" value in dropdown list and apply this macro again, it
unhides all cells, including blanks.

kind regards,
nader

"Stefi" wrote:

The VBA equivalent of choosing All from Autofilter dropdown list is:
Selection.AutoFilter Field:=6
It must unhide all cells, including blanks. If you have other problem, give
more details!

Regards,
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi
when i filter(all) by your macro it don't show blanks.
is possible it show blanks too?
it is important for me.
thanks

"Stefi" wrote:

You are welcome! Thanks for the feedback!
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi

it works well.

any thanks.
nader

"Stefi" wrote:

Try this way:
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Sheets("Sheet2").Range("A1").Value

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi all dears

i need your helps
I use following mocro:

Sheets("Sheet1").Select
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Range("Sheet2!A1").Value

I need to filter(All) by putting a value in cell ("Sheet2!A1").

Thanks.

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 44
Default Aouto filter by macro

hi
i really appreciate your helps,
i am new in excel, specially in VB and i will spent hours trying to use your
helps.
i hop let me i use your helps about this sobject at the next times.
warm regards,
nader


"Stefi" wrote:

Insert this event sub into code window of Sheet2:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "A1" Then Call filtFcol(Target.Value)
End Sub

Insert this sub into a normal module:
Sub filtFcol(filtval)
Worksheets("Sheet1").Select
Columns("F:F").Select
Selection.AutoFilter
If filtval = "all" Then
Selection.AutoFilter Field:=1
Else
Selection.AutoFilter Field:=1, Criteria1:=filtval
End If
End Sub

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi stefi

Description of my question is:

I have a dropdown list like:

toyota
nissan
kia
all

in "sheet2" cell "A1" and i have column F in "sheet1" contain names above.
I want to have a macro, when i choose a value from dropdown list in "sheet2"
"A1" and apply macro, Excell filters in "sheet1" column F by this value and
when i choose "all" value in dropdown list and apply this macro again, it
unhides all cells, including blanks.

kind regards,
nader

"Stefi" wrote:

The VBA equivalent of choosing All from Autofilter dropdown list is:
Selection.AutoFilter Field:=6
It must unhide all cells, including blanks. If you have other problem, give
more details!

Regards,
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi
when i filter(all) by your macro it don't show blanks.
is possible it show blanks too?
it is important for me.
thanks

"Stefi" wrote:

You are welcome! Thanks for the feedback!
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi

it works well.

any thanks.
nader

"Stefi" wrote:

Try this way:
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Sheets("Sheet2").Range("A1").Value

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi all dears

i need your helps
I use following mocro:

Sheets("Sheet1").Select
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Range("Sheet2!A1").Value

I need to filter(All) by putting a value in cell ("Sheet2!A1").

Thanks.



  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Aouto filter by macro


You are welcome! Thanks for the feedback! Feel free to post if you need some
help to understand the code!
Stefi

€žnader€ť ezt Ă*rta:

hi
i really appreciate your helps,
i am new in excel, specially in VB and i will spent hours trying to use your
helps.
i hop let me i use your helps about this sobject at the next times.
warm regards,
nader


"Stefi" wrote:

Insert this event sub into code window of Sheet2:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "A1" Then Call filtFcol(Target.Value)
End Sub

Insert this sub into a normal module:
Sub filtFcol(filtval)
Worksheets("Sheet1").Select
Columns("F:F").Select
Selection.AutoFilter
If filtval = "all" Then
Selection.AutoFilter Field:=1
Else
Selection.AutoFilter Field:=1, Criteria1:=filtval
End If
End Sub

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi stefi

Description of my question is:

I have a dropdown list like:

toyota
nissan
kia
all

in "sheet2" cell "A1" and i have column F in "sheet1" contain names above.
I want to have a macro, when i choose a value from dropdown list in "sheet2"
"A1" and apply macro, Excell filters in "sheet1" column F by this value and
when i choose "all" value in dropdown list and apply this macro again, it
unhides all cells, including blanks.

kind regards,
nader

"Stefi" wrote:

The VBA equivalent of choosing All from Autofilter dropdown list is:
Selection.AutoFilter Field:=6
It must unhide all cells, including blanks. If you have other problem, give
more details!

Regards,
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi
when i filter(all) by your macro it don't show blanks.
is possible it show blanks too?
it is important for me.
thanks

"Stefi" wrote:

You are welcome! Thanks for the feedback!
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi

it works well.

any thanks.
nader

"Stefi" wrote:

Try this way:
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Sheets("Sheet2").Range("A1").Value

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi all dears

i need your helps
I use following mocro:

Sheets("Sheet1").Select
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Range("Sheet2!A1").Value

I need to filter(All) by putting a value in cell ("Sheet2!A1").

Thanks.

  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 44
Default Aouto filter by macro

hi
I did:click right on sheet2 tab---view code---inserted your suggestion
(event sub) in to the window.
then I got a new module and inserted your suggestion (sub) in to that window.
because of the name of this project didn't show in the ' run macro' window,
so I don't know how I
running this project.

kind regards.
nader


"Stefi" wrote:


You are welcome! Thanks for the feedback! Feel free to post if you need some
help to understand the code!
Stefi

€žnader€ť ezt Ă*rta:

hi
i really appreciate your helps,
i am new in excel, specially in VB and i will spent hours trying to use your
helps.
i hop let me i use your helps about this sobject at the next times.
warm regards,
nader


"Stefi" wrote:

Insert this event sub into code window of Sheet2:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "A1" Then Call filtFcol(Target.Value)
End Sub

Insert this sub into a normal module:
Sub filtFcol(filtval)
Worksheets("Sheet1").Select
Columns("F:F").Select
Selection.AutoFilter
If filtval = "all" Then
Selection.AutoFilter Field:=1
Else
Selection.AutoFilter Field:=1, Criteria1:=filtval
End If
End Sub

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi stefi

Description of my question is:

I have a dropdown list like:

toyota
nissan
kia
all

in "sheet2" cell "A1" and i have column F in "sheet1" contain names above.
I want to have a macro, when i choose a value from dropdown list in "sheet2"
"A1" and apply macro, Excell filters in "sheet1" column F by this value and
when i choose "all" value in dropdown list and apply this macro again, it
unhides all cells, including blanks.

kind regards,
nader

"Stefi" wrote:

The VBA equivalent of choosing All from Autofilter dropdown list is:
Selection.AutoFilter Field:=6
It must unhide all cells, including blanks. If you have other problem, give
more details!

Regards,
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi
when i filter(all) by your macro it don't show blanks.
is possible it show blanks too?
it is important for me.
thanks

"Stefi" wrote:

You are welcome! Thanks for the feedback!
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi

it works well.

any thanks.
nader

"Stefi" wrote:

Try this way:
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Sheets("Sheet2").Range("A1").Value

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi all dears

i need your helps
I use following mocro:

Sheets("Sheet1").Select
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Range("Sheet2!A1").Value

I need to filter(All) by putting a value in cell ("Sheet2!A1").

Thanks.

  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Aouto filter by macro

Just type a new value in cell A1 in sheet2, the event sub should
automatically fire (if the installation was correct).
Stefi


€žnader€ť ezt Ă*rta:

hi
I did:click right on sheet2 tab---view code---inserted your suggestion
(event sub) in to the window.
then I got a new module and inserted your suggestion (sub) in to that window.
because of the name of this project didn't show in the ' run macro' window,
so I don't know how I
running this project.

kind regards.
nader


"Stefi" wrote:


You are welcome! Thanks for the feedback! Feel free to post if you need some
help to understand the code!
Stefi

€žnader€ť ezt Ă*rta:

hi
i really appreciate your helps,
i am new in excel, specially in VB and i will spent hours trying to use your
helps.
i hop let me i use your helps about this sobject at the next times.
warm regards,
nader


"Stefi" wrote:

Insert this event sub into code window of Sheet2:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "A1" Then Call filtFcol(Target.Value)
End Sub

Insert this sub into a normal module:
Sub filtFcol(filtval)
Worksheets("Sheet1").Select
Columns("F:F").Select
Selection.AutoFilter
If filtval = "all" Then
Selection.AutoFilter Field:=1
Else
Selection.AutoFilter Field:=1, Criteria1:=filtval
End If
End Sub

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi stefi

Description of my question is:

I have a dropdown list like:

toyota
nissan
kia
all

in "sheet2" cell "A1" and i have column F in "sheet1" contain names above.
I want to have a macro, when i choose a value from dropdown list in "sheet2"
"A1" and apply macro, Excell filters in "sheet1" column F by this value and
when i choose "all" value in dropdown list and apply this macro again, it
unhides all cells, including blanks.

kind regards,
nader

"Stefi" wrote:

The VBA equivalent of choosing All from Autofilter dropdown list is:
Selection.AutoFilter Field:=6
It must unhide all cells, including blanks. If you have other problem, give
more details!

Regards,
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi
when i filter(all) by your macro it don't show blanks.
is possible it show blanks too?
it is important for me.
thanks

"Stefi" wrote:

You are welcome! Thanks for the feedback!
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi

it works well.

any thanks.
nader

"Stefi" wrote:

Try this way:
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Sheets("Sheet2").Range("A1").Value

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi all dears

i need your helps
I use following mocro:

Sheets("Sheet1").Select
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Range("Sheet2!A1").Value

I need to filter(All) by putting a value in cell ("Sheet2!A1").

Thanks.

  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 44
Default Aouto filter by macro

just i changed:
filtFcol to filtHcol
(F:F) to (H:H)
A1 to I3
sheet1 to correct sheet name
as a my work book possition;
does it make mistake?

regards
nader

"Stefi" wrote:

Just type a new value in cell A1 in sheet2, the event sub should
automatically fire (if the installation was correct).
Stefi


€žnader€ť ezt Ă*rta:

hi
I did:click right on sheet2 tab---view code---inserted your suggestion
(event sub) in to the window.
then I got a new module and inserted your suggestion (sub) in to that window.
because of the name of this project didn't show in the ' run macro' window,
so I don't know how I
running this project.

kind regards.
nader


"Stefi" wrote:


You are welcome! Thanks for the feedback! Feel free to post if you need some
help to understand the code!
Stefi

€žnader€ť ezt Ă*rta:

hi
i really appreciate your helps,
i am new in excel, specially in VB and i will spent hours trying to use your
helps.
i hop let me i use your helps about this sobject at the next times.
warm regards,
nader


"Stefi" wrote:

Insert this event sub into code window of Sheet2:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "A1" Then Call filtFcol(Target.Value)
End Sub

Insert this sub into a normal module:
Sub filtFcol(filtval)
Worksheets("Sheet1").Select
Columns("F:F").Select
Selection.AutoFilter
If filtval = "all" Then
Selection.AutoFilter Field:=1
Else
Selection.AutoFilter Field:=1, Criteria1:=filtval
End If
End Sub

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi stefi

Description of my question is:

I have a dropdown list like:

toyota
nissan
kia
all

in "sheet2" cell "A1" and i have column F in "sheet1" contain names above.
I want to have a macro, when i choose a value from dropdown list in "sheet2"
"A1" and apply macro, Excell filters in "sheet1" column F by this value and
when i choose "all" value in dropdown list and apply this macro again, it
unhides all cells, including blanks.

kind regards,
nader

"Stefi" wrote:

The VBA equivalent of choosing All from Autofilter dropdown list is:
Selection.AutoFilter Field:=6
It must unhide all cells, including blanks. If you have other problem, give
more details!

Regards,
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi
when i filter(all) by your macro it don't show blanks.
is possible it show blanks too?
it is important for me.
thanks

"Stefi" wrote:

You are welcome! Thanks for the feedback!
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi

it works well.

any thanks.
nader

"Stefi" wrote:

Try this way:
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Sheets("Sheet2").Range("A1").Value

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi all dears

i need your helps
I use following mocro:

Sheets("Sheet1").Select
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Range("Sheet2!A1").Value

I need to filter(All) by putting a value in cell ("Sheet2!A1").

Thanks.

  #15   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 44
Default Aouto filter by macro

HI stefi

I tried again whit your VB without changes but it returned a warning
message:(sub
or function not defined)
and (call filtFcol)in the code window was highlight.
please help me

best regards.
nader

"Stefi" wrote:

Just type a new value in cell A1 in sheet2, the event sub should
automatically fire (if the installation was correct).
Stefi


€žnader€ť ezt Ă*rta:

hi
I did:click right on sheet2 tab---view code---inserted your suggestion
(event sub) in to the window.
then I got a new module and inserted your suggestion (sub) in to that window.
because of the name of this project didn't show in the ' run macro' window,
so I don't know how I
running this project.

kind regards.
nader


"Stefi" wrote:


You are welcome! Thanks for the feedback! Feel free to post if you need some
help to understand the code!
Stefi

€žnader€ť ezt Ă*rta:

hi
i really appreciate your helps,
i am new in excel, specially in VB and i will spent hours trying to use your
helps.
i hop let me i use your helps about this sobject at the next times.
warm regards,
nader


"Stefi" wrote:

Insert this event sub into code window of Sheet2:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "A1" Then Call filtFcol(Target.Value)
End Sub

Insert this sub into a normal module:
Sub filtFcol(filtval)
Worksheets("Sheet1").Select
Columns("F:F").Select
Selection.AutoFilter
If filtval = "all" Then
Selection.AutoFilter Field:=1
Else
Selection.AutoFilter Field:=1, Criteria1:=filtval
End If
End Sub

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi stefi

Description of my question is:

I have a dropdown list like:

toyota
nissan
kia
all

in "sheet2" cell "A1" and i have column F in "sheet1" contain names above.
I want to have a macro, when i choose a value from dropdown list in "sheet2"
"A1" and apply macro, Excell filters in "sheet1" column F by this value and
when i choose "all" value in dropdown list and apply this macro again, it
unhides all cells, including blanks.

kind regards,
nader

"Stefi" wrote:

The VBA equivalent of choosing All from Autofilter dropdown list is:
Selection.AutoFilter Field:=6
It must unhide all cells, including blanks. If you have other problem, give
more details!

Regards,
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi
when i filter(all) by your macro it don't show blanks.
is possible it show blanks too?
it is important for me.
thanks

"Stefi" wrote:

You are welcome! Thanks for the feedback!
Stefi

€žnader€ť ezt Ă*rta:

HI Stefi

it works well.

any thanks.
nader

"Stefi" wrote:

Try this way:
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Sheets("Sheet2").Range("A1").Value

Regards,
Stefi


€žnader€ť ezt Ă*rta:

hi all dears

i need your helps
I use following mocro:

Sheets("Sheet1").Select
Selection.AutoFilter Field:=6, _
Criteria1:="=" & Range("Sheet2!A1").Value

I need to filter(All) by putting a value in cell ("Sheet2!A1").

Thanks.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter date in macro Dolphinv4 Excel Discussion (Misc queries) 1 August 24th 07 02:19 AM
how can this filter be done in a macro? Dave F Excel Discussion (Misc queries) 8 March 2nd 07 09:22 AM
Do i use a filter or a macro? Anthony Excel Discussion (Misc queries) 2 January 10th 07 11:11 AM
macro to filter out data shabb090177 Excel Worksheet Functions 8 June 29th 06 01:44 PM
Need a filter macro comotoman Excel Discussion (Misc queries) 0 October 6th 05 09:03 PM


All times are GMT +1. The time now is 03:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"