I thought i knew Excel
New Member
- Joined
- Oct 1, 2015
- Messages
- 3
Hej
i have a workbook, with a frontpage of pivottable outputs in form of charts and tables, that are controlled by several Sliders, the pivot tables are on other sheets.
my problem is that depending on the selection in the sliders, sometimes my table has a few lines of data and sometimes there are a lots of lines of data.
i would therefore like to hide the rows where there is no data.
i have the following VBA, but it only works when i updates a cell.
i have tried to use the different "Worksheet_PivotTable...." but with no luck
help would be greatly appriciated.
all the best
Marc
i have a workbook, with a frontpage of pivottable outputs in form of charts and tables, that are controlled by several Sliders, the pivot tables are on other sheets.
my problem is that depending on the selection in the sliders, sometimes my table has a few lines of data and sometimes there are a lots of lines of data.
i would therefore like to hide the rows where there is no data.
i have the following VBA, but it only works when i updates a cell.
Code:
Private Sub Worksheet_Change(ByVal target As Range)
For Each cell In Range("Subrange1")
If Application.WorksheetFunction.IsNumber(cell) Then
cell.EntireRow.Hidden = False
Else
cell.EntireRow.Hidden = True
End If
Next cell
End Sub
i have tried to use the different "Worksheet_PivotTable...." but with no luck
help would be greatly appriciated.
all the best
Marc