ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Hiding/unhiding rows (https://www.excelbanter.com/excel-discussion-misc-queries/165609-hiding-unhiding-rows.html)

Matheus

Hiding/unhiding rows
 
I have a calculation on E5 with its raw data in E6, E7 and E8. I would like
to have a button to allow the user to hide and unhide the data in E6 - E8
kind like a tree org. "+" and "-+ buttom.

smw226 via OfficeKB.com

Hiding/unhiding rows
 
Hi Matheus,

Do you want to just hide the 3 cells or are you OK hiding the entire row?

If its the latter, you can highlight the 3 rows, goto Data - Group and
Outline - Group

This will put the little + on the side like a subtotal does.

HTH

Simon

Matheus wrote:
I have a calculation on E5 with its raw data in E6, E7 and E8. I would like
to have a button to allow the user to hide and unhide the data in E6 - E8
kind like a tree org. "+" and "-+ buttom.


--
--------------------
Simon - UK

Email at simon22mports [ a t ] hot mail [ d ot ]com

Message posted via http://www.officekb.com


Don Guillett

Hiding/unhiding rows
 

Sub togglehiderows()
Rows("6:8").Hidden = Not Rows("6:8").Hidden
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Matheus" wrote in message
...
I have a calculation on E5 with its raw data in E6, E7 and E8. I would like
to have a button to allow the user to hide and unhide the data in E6 - E8
kind like a tree org. "+" and "-+ buttom.




All times are GMT +1. The time now is 11:44 AM.

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