ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I use auto filter on only 1 column in a spreadsheet? (https://www.excelbanter.com/excel-worksheet-functions/11074-how-do-i-use-auto-filter-only-1-column-spreadsheet.html)

celestemberner

How do I use auto filter on only 1 column in a spreadsheet?
 
I have a list of clients, phone numbers, types of business and dollar
amounts. I only want to use the auto filter for the columns that have client
name and types of business. It would do no good to filter by phones numbers,
etc.

Debra Dalgleish

You could use a macro to hide some of the arrows. For example:

'==========================
Sub HideSomeArrows()
'hide some autofilter arrows
Dim c As Range
Dim i As Integer
i = Cells(1, 1).End(xlToRight).Column
Application.ScreenUpdating = False
For Each c In Range(Cells(1, 1), Cells(1, i))
Select Case c.Column
Case 2, 3, 5, 6
c.AutoFilter Field:=c.Column, _
Visibledropdown:=False
Case Else
c.AutoFilter Field:=c.Column, _
Visibledropdown:=True
End Select
Next
Application.ScreenUpdating = True
End Sub
'=============================

Copy the code to a regular module, as described he

http://www.contextures.com/xlvba01.html

To run the macro, activate the sheet with the AutoFilter
Then choose ToolsMacroMacros
Select the HideSomeArrows macro, and click the Run button

celestemberner wrote:
I have a list of clients, phone numbers, types of business and dollar
amounts. I only want to use the auto filter for the columns that have client
name and types of business. It would do no good to filter by phones numbers,
etc.



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


Gord Dibben

In that case just click on the arrow for Clients or Business Types.

You cannot filter just one or two columns and have the others not filtered
along with it. Filtered out rows will be hidden no matter which column you
use as the criterion column.

If the extra arrows bother you, select just those two columns by selecting the
headers, you will get filter arrows in just those columns.


Gord Dibben Excel MVP

On Tue, 1 Feb 2005 15:07:02 -0800, "celestemberner"
wrote:

I have a list of clients, phone numbers, types of business and dollar
amounts. I only want to use the auto filter for the columns that have client
name and types of business. It would do no good to filter by phones numbers,
etc.




All times are GMT +1. The time now is 05:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com