Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a large spreadsheet which will be populated based on the selection
from a drop down list box. The values populated will contain alot of zero values which I have blanked out using the tools/options functionality but I would like to automatically hide the column if all values within a range in that column are zero. Can this be done using advanced filter ? if so how ... any other suggestions ? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I use the following Macro in a Workbook of mine.
Before running the Macro (Which is in a Standard Code module) Click and sellect the Column-Header (First to Last) of your data; Allows for say Column C thru Column S (Columns A & B Blank) Try this on a COPY of your WB first Sub HideColumnsWithZeroValues() Dim i As Integer Dim ColCount As Integer Application.ScreenUpdating = False StrCol = Selection(1).Column ColCount = Selection.Columns.Count + StrCol - 1 With Selection For i = StrCol To ColCount If Application.WorksheetFunction.Sum(Columns(i)) = 0 Then Columns(i).EntireColumn.Hidden = True End If Next i End With Application.ScreenUpdating = True End Sub Good Luck "David Hainsworth" wrote: I have a large spreadsheet which will be populated based on the selection from a drop down list box. The values populated will contain alot of zero values which I have blanked out using the tools/options functionality but I would like to automatically hide the column if all values within a range in that column are zero. Can this be done using advanced filter ? if so how ... any other suggestions ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Automatically hide column or row if a cell value meets criteria | Excel Worksheet Functions | |||
Automatically highlight max and min values in a column in Excel | Excel Discussion (Misc queries) | |||
How do I set up Excel to automatically hide certain rows? | Excel Discussion (Misc queries) | |||
values are appearing automatically in the next column | Excel Discussion (Misc queries) | |||
how do i set up a column with negative values automatically? | Excel Discussion (Misc queries) |