Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to create a view option (or hide/unhide preselected cells) (Repost from Misc)


I have the following problem: I need to set a worksheet so the user can
choose to view/print it with or without the cells containing exhaustive
explanations. (Those cells are NOT in a single bundle...)

Is there a way, (say, with a button or another macro), that I could set
this worksheet to hide or unhide preselected rows so the user can switch
from one view to another in a single simple operation?

(Any suggestion is welcome: I need all available options.)

THANKS!

For those who wants to know the purpose: it is a compliance matrix
(checklist-like) with design requirements. The cells that need to be
set are the ones containing secondary information regarding each of the
requirements. (The "simple" view should allow to shorten the list
considerably, without loosing the information.)


--
Turquoise_dax
------------------------------------------------------------------------
Turquoise_dax's Profile: http://www.excelforum.com/member.php...o&userid=35185
View this thread: http://www.excelforum.com/showthread...hreadid=552401

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default How to create a view option (or hide/unhide preselected cells) (Re

You could try the "Autofilter" approach.

When the button for "Incomplete" could trigger the following code:

Sheets("Sheetname").Select
Activesheet.Columns("D").select ' Assuming Column D holds the terms
"Complete" and "Incomplete"

Selection.AutoFilter Field:=1, Criteria1:="=Incomplete"

Jim

"Turquoise_dax" wrote:


I have the following problem: I need to set a worksheet so the user can
choose to view/print it with or without the cells containing exhaustive
explanations. (Those cells are NOT in a single bundle...)

Is there a way, (say, with a button or another macro), that I could set
this worksheet to hide or unhide preselected rows so the user can switch
from one view to another in a single simple operation?

(Any suggestion is welcome: I need all available options.)

THANKS!

For those who wants to know the purpose: it is a compliance matrix
(checklist-like) with design requirements. The cells that need to be
set are the ones containing secondary information regarding each of the
requirements. (The "simple" view should allow to shorten the list
considerably, without loosing the information.)


--
Turquoise_dax
------------------------------------------------------------------------
Turquoise_dax's Profile: http://www.excelforum.com/member.php...o&userid=35185
View this thread: http://www.excelforum.com/showthread...hreadid=552401


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to create a view option (or hide/unhide preselected cells) (Repost from Misc)


I tried it, (adjusting column and criteria, of course!), and when I
click the button, it hides all rows (2-12) while only the 8 and 11
contained the criteria.

On the other hand, I am a newbie at trying to programm buttons, so
maybe I do something wrong right from the start...

(I used the tool to create the button, I assigned a macro, and I went
in visual basic, simply cutting/pasting your code, getting rid of the
comments and adjusting column letter and criteria.)


--
Turquoise_dax
------------------------------------------------------------------------
Turquoise_dax's Profile: http://www.excelforum.com/member.php...o&userid=35185
View this thread: http://www.excelforum.com/showthread...hreadid=552401

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How to create a view option (or hide/unhide preselected cells) (Repost from Misc)

I am not very good at macros or more advanced things in excel, but what
I would do is just make a checkbox that asks if the user wants the long
explanations on/off and link it to say A1. Then in the cells with the
long explanations put the code: =if(A1=true,"long
exanations...","shorter explanations..."), or go into conditional
formatting and type under formula =A1=true then change the font color
to white so it does not appear.

just some ideas of what i might try

Turquoise_dax wrote:
I have the following problem: I need to set a worksheet so the user can
choose to view/print it with or without the cells containing exhaustive
explanations. (Those cells are NOT in a single bundle...)

Is there a way, (say, with a button or another macro), that I could set
this worksheet to hide or unhide preselected rows so the user can switch
from one view to another in a single simple operation?

(Any suggestion is welcome: I need all available options.)

THANKS!

For those who wants to know the purpose: it is a compliance matrix
(checklist-like) with design requirements. The cells that need to be
set are the ones containing secondary information regarding each of the
requirements. (The "simple" view should allow to shorten the list
considerably, without loosing the information.)


--
Turquoise_dax
------------------------------------------------------------------------
Turquoise_dax's Profile: http://www.excelforum.com/member.php...o&userid=35185
View this thread: http://www.excelforum.com/showthread...hreadid=552401


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default How to create a view option (or hide/unhide preselected cells)

I should have asked if your other columns were set for Autofilter. In the
example I gave, if columns A through D are set for Autofilter then use
Field:=4 and it should work.

Jim

"Jim Jackson" wrote:

You could try the "Autofilter" approach.

When the button for "Incomplete" could trigger the following code:

Sheets("Sheetname").Select
Activesheet.Columns("D").select ' Assuming Column D holds the terms
"Complete" and "Incomplete"

Selection.AutoFilter Field:=1, Criteria1:="=Incomplete"

Jim

"Turquoise_dax" wrote:


I have the following problem: I need to set a worksheet so the user can
choose to view/print it with or without the cells containing exhaustive
explanations. (Those cells are NOT in a single bundle...)

Is there a way, (say, with a button or another macro), that I could set
this worksheet to hide or unhide preselected rows so the user can switch
from one view to another in a single simple operation?

(Any suggestion is welcome: I need all available options.)

THANKS!

For those who wants to know the purpose: it is a compliance matrix
(checklist-like) with design requirements. The cells that need to be
set are the ones containing secondary information regarding each of the
requirements. (The "simple" view should allow to shorten the list
considerably, without loosing the information.)


--
Turquoise_dax
------------------------------------------------------------------------
Turquoise_dax's Profile: http://www.excelforum.com/member.php...o&userid=35185
View this thread: http://www.excelforum.com/showthread...hreadid=552401


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 option fedosomwan Excel Worksheet Functions 1 February 18th 10 04:32 PM
Hide/Unhide Option - Need to consider all options! Turquoise_dax Excel Discussion (Misc queries) 3 June 15th 06 09:17 PM
Switching views - Hide / Unhide preselected cells (Repost) Turquoise_dax Excel Discussion (Misc queries) 0 June 15th 06 07:03 PM
create option to view worksheet tabs vertically nk Setting up and Configuration of Excel 1 May 11th 06 11:49 AM
create button that can hide/unhide sheets and hyperlink... Helen Excel Programming 7 November 16th 05 04:03 AM


All times are GMT +1. The time now is 03:31 PM.

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

About Us

"It's about Microsoft Excel"