A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » New Users to Excel
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Toggle button for hide/unhide columns



 
 
Thread Tools Display Modes
  #1  
Old January 15th 16, 03:28 PM
user_excel1 user_excel1 is offline
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
 
Ads
  #2  
Old January 15th 16, 05:47 PM posted to microsoft.public.excel.newusers
Claus Busch
external usenet poster
 
Posts: 3,403
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  
Old March 1st 16, 04:39 PM
wickedchew wickedchew is offline
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
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
hide & unhide toggle button [email protected] Excel Programming 3 November 1st 12 04: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 10: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 02:06 PM.


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