View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
p45cal[_46_] p45cal[_46_] is offline
external usenet poster
 
Posts: 1
Default Excel 2002 Filter


Dave Peterson;462943 Wrote:
It's true that the filtered range has to be a contiguous range, but you
can hide
the arrows using code (or maybe just hide the columns (or move the to
the far
right or far left of the range to be filtered).

If you want to try the code stuff, visit Debra Dalgleish's site:
'Excel Filters -- AutoFilter Programming'
(http://contextures.com/xlautofilter03.html#Hide)

If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
'Excel VBA -- Adding Code to a Workbook'
(http://www.contextures.com/xlvba01.html)

David McRitchie has an intro to macros:
'Getting Started with Macros and User Defined Functions'
(http://www.mvps.org/dmcritchie/excel/getstarted.htm)

Ron de Bruin's intro to macros:
'Where do I paste the code that I want to use in my workbook'
(http://www.rondebruin.nl/code.htm)

(General, Regular and Standard modules all describe the same thing.)

Chris waller wrote:

A colleague who is using Excel 2002 is trying to filter some data.

The
problem is that there are two columns within the range that he does

not want
the filter arrows to appear on, for fear that if someone else got

hold of it
they make a mess of it. I think that if you filter the data the range

has to
be a continuous area and cannot be separated by blank columns. Can

someone
confirm that this is correct or not? TIA


--

Dave Peterson


I'd point out that in Excel 200*3*, a range which is not contiguous and
contains blank rows and/or columns can be filtered if you select the
whole range before applying the Autofilter.

In code, you can hide whichever dropdown arrows you
like Range("F15:N26").AutoFilter 3, , , , False
'hide dropdown for 3rd column
Range("F15:N26").AutoFilter 5, , , , False 'hide dropdown for 5th
column
and of course, if the columns you don't want to show
dropdown arrows for are at the extreme left or right of the range,
simply don't include them when selecting the range to autofilter.


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=128026