VBA code question

P

peyman

hi,
How can I limit this code Worksheets("sheet 1").ShowAllData to some specific
columns like B & C istead of unfiltering whole the worksheet.
Thanx,
 
J

Jim Cone

Cells.AutoFilter Field:=2
--
Jim Cone
Portland, Oregon USA

"peyman"
<[email protected]>
wrote in message
hi,
How can I limit this code Worksheets("sheet 1").ShowAllData to some specific
columns like B & C istead of unfiltering whole the worksheet.
Thanx,
 
D

Don Guillett

Just recorded

Sub Macro2()
'
' Macro2 Macro
' Macro recorded 2/4/2009 by Donald B. Guillett
'

'
Selection.AutoFilter Field:=3
Selection.AutoFilter Field:=2
End Sub
 
P

peyman

thank you very much

Don Guillett said:
Just recorded

Sub Macro2()
'
' Macro2 Macro
' Macro recorded 2/4/2009 by Donald B. Guillett
'

'
Selection.AutoFilter Field:=3
Selection.AutoFilter Field:=2
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
[email protected]
 
F

FSt1

hi
i doubt that you can. technically excels "filters" by hiding rows. and it's
not possible to hide or unhide part of a row (or column).

Regards
FSt1
 
Top