ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Filtering data hides row (https://www.excelbanter.com/excel-programming/428914-filtering-data-hides-row.html)

John[_140_]

Filtering data hides row
 
When I filter data in Excel 2007 my totals row (at the bottom of the data)
dissappears. I put the following statement in my Worksheet_Change and
Worksheet_SelectionChange event:

Range("TotalsRow").EntireRow.Hidden = False

On large files this slows down my spreadsheet considerably. Is there a
better way to unhide this row when I filter data?



Don Guillett

Filtering data hides row
 
Perhaps you could put your totals at the TOP.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"John" wrote in message
...
When I filter data in Excel 2007 my totals row (at the bottom of the data)
dissappears. I put the following statement in my Worksheet_Change and
Worksheet_SelectionChange event:

Range("TotalsRow").EntireRow.Hidden = False

On large files this slows down my spreadsheet considerably. Is there a
better way to unhide this row when I filter data?



John[_140_]

Filtering data hides row
 
I had thought about putting the totals at the top, and I may be forced to do
so. I prefer they be on the bottom. I'm thinking if I used an IF statement
in my events (If FilterMode, for example), then the statement wouldn't be
evaluated by Excel as many times? I'm still looking for ideas.


"Don Guillett" wrote in message
...
Perhaps you could put your totals at the TOP.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"John" wrote in message
...
When I filter data in Excel 2007 my totals row (at the bottom of the
data) dissappears. I put the following statement in my Worksheet_Change
and Worksheet_SelectionChange event:

Range("TotalsRow").EntireRow.Hidden = False

On large files this slows down my spreadsheet considerably. Is there a
better way to unhide this row when I filter data?





Don Guillett

Filtering data hides row
 
Filter on one row less than the last row. Notice the -1

lr = Cells(Rows.Count, "b").End(xlUp).Row-1
With Range("a2:i" & lr)
.AutoFilter Field:=1, Criteria1:="whatever"
End With

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"John" wrote in message
...
I had thought about putting the totals at the top, and I may be forced to
do so. I prefer they be on the bottom. I'm thinking if I used an IF
statement in my events (If FilterMode, for example), then the statement
wouldn't be evaluated by Excel as many times? I'm still looking for ideas.


"Don Guillett" wrote in message
...
Perhaps you could put your totals at the TOP.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"John" wrote in message
...
When I filter data in Excel 2007 my totals row (at the bottom of the
data) dissappears. I put the following statement in my Worksheet_Change
and Worksheet_SelectionChange event:

Range("TotalsRow").EntireRow.Hidden = False

On large files this slows down my spreadsheet considerably. Is there a
better way to unhide this row when I filter data?







All times are GMT +1. The time now is 09:30 AM.

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