Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old January 15th 16, 02:28 PM
Junior Member
 
First recorded activity by ExcelBanter: Jan 2016
Posts: 1
Default Toggle button for hide/unhide columns

I have looked in all kind of forums but unfortunately I had no chance finding the solution for my problem..
Being a absolute beginner in Excel I need someone to help me.
I use Excel 2010 and I need to do next task..

I have a table with 8 rows and 10 columns. I have to create a toggle button to show only certain columns.
For example.
If in B2, B5, B9 etc.. says "FINISHED", and in B1, B3,B4,B6 says "NOT FINISHED" I need the toggle buttons that when clicked only shows entire columns with these perimeters...
Anyway, I have attached screenshot of what I was thinking...
Attached Images
 

  #2   Report Post  
Old January 15th 16, 04:47 PM posted to microsoft.public.excel.newusers
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2011
Posts: 3,466
Default Toggle button for hide/unhide columns

Hi,

Am Fri, 15 Jan 2016 14:28:21 +0000 schrieb user_excel1:

I have looked in all kind of forums but unfortunately I had no chance
finding the solution for my problem..
Being a absolute beginner in Excel I need someone to help me.
I use Excel 2010 and I need to do next task..

I have a table with 8 rows and 10 columns. I have to create a toggle
button to show only certain columns.
For example.
If in B2, B5, B9 etc.. says "FINISHED", and in B1, B3,B4,B6 says "NOT
FINISHED" I need the toggle buttons that when clicked only shows entire
columns with these perimeters...
Anyway, I have attached screenshot of what I was thinking...

+-------------------------------------------------------------------+
|Filename: toggle_button.jpg |
|Download: http://www.excelbanter.com/attachment.php?attachmentid=1024|
+-------------------------------------------------------------------+


why don't you filter by these values?


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
  #3   Report Post  
Old March 1st 16, 03:39 PM
Senior Member
 
First recorded activity by ExcelBanter: Aug 2010
Location: Philippines
Posts: 161
Default

Quote:
Originally Posted by user_excel1 View Post
I have looked in all kind of forums but unfortunately I had no chance finding the solution for my problem..
Being a absolute beginner in Excel I need someone to help me.
I use Excel 2010 and I need to do next task..

I have a table with 8 rows and 10 columns. I have to create a toggle button to show only certain columns.
For example.
If in B2, B5, B9 etc.. says "FINISHED", and in B1, B3,B4,B6 says "NOT FINISHED" I need the toggle buttons that when clicked only shows entire columns with these perimeters...
Anyway, I have attached screenshot of what I was thinking...
Yup. Filtering would be so much easier. But if you wanted it in a code:

Sub HideFinishedColumns()

Application.ScreenUpdating = False

a = Range("H" & Rows.Count).End(xlUp).Row
For b = a To 1 Step -1
If Cells(b, 8) = "F" Then
Rows(b).Select
Selection.EntireRow.Hidden = True
End If
Next b

Application.ScreenUpdating = True

End Sub

Sub ShowAllColumns()

Application.ScreenUpdating = False
Cells.Select
Selection.EntireRow.Hidden = False
Range("A1").Select
Application.ScreenUpdating = True

End Sub
__________________
Asobi Wa Owari Da


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
hide & unhide toggle button [email protected] Excel Programming 3 November 1st 12 03:28 AM
Hide/Unhide Toggle BEEJAY Excel Programming 3 July 17th 08 08:32 PM
Toggle Command Button to Show/Hide the Shaded Headers Columns u473 Excel Programming 1 April 21st 08 07:27 PM
Hide/Unhide columns using button on top over relevant columns [email protected] Excel Discussion (Misc queries) 1 March 7th 07 09:24 PM
Syntax of hide/unhide personal.xls toggle mikeburg[_32_] Excel Programming 2 September 24th 05 01:24 AM


All times are GMT +1. The time now is 06:24 AM.

Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright 2004-2017 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017