Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Condition based on worksheet visibility? Please help!

 
   Mac (Home) -> Mac Excel RSS
Next:  another IF query  
Author Message
juchelka.shopping

External


Since: Oct 13, 2005
Posts: 1



(Msg. 1) Posted: Thu Oct 13, 2005 8:07 pm
Post subject: Condition based on worksheet visibility? Please help!
Archived from groups: microsoft>public>mac>office>excel (more info?)

I have workbook containing several worksheets (Excel for Mac 2004). I
would like to create formula in cell(s) on one worksheet based on
visibility (hidden status) of other individual worksheets. Let's say if
the particular worksheet is hidden, set value to zero, otherwise set
value to 1. I know how to approach the formula in general, What I don't
know is, how to check for hidden status of worksheet (what is the
attribute?). Any ideas?

Thank you very much for any help or direction!

Alex
Back to top
Login to vote
Jim Gordon MVP

External


Since: Dec 11, 2005
Posts: 206



(Msg. 2) Posted: Thu Oct 13, 2005 11:17 pm
Post subject: Re: Condition based on worksheet visibility? Please help! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Alex,

There isn't a worksheet function that will directly indicate whether or
not a worksheet is hidden.

If you can change the value of a cell before you hide a given worksheet
you could use the worksheet function ISBLANK to determine whether or not
that particular cell is empty. If you put an X into the cell before you
hide the sheet then ISBLANK will be FALSE.

If you want a completely automated solution you will need to use a
little visual basic to obtain the status of the Hidden property for the
worksheet.

-Jim

--
Jim Gordon
Mac MVP
MVP FAQ
<http://mvp.support.microsoft.com/default.aspx?scid=fh;EN-US;mvpfaqs>


juchelka.shopping RemoveThis @verizon.net wrote:
> I have workbook containing several worksheets (Excel for Mac 2004). I
> would like to create formula in cell(s) on one worksheet based on
> visibility (hidden status) of other individual worksheets. Let's say if
> the particular worksheet is hidden, set value to zero, otherwise set
> value to 1. I know how to approach the formula in general, What I don't
> know is, how to check for hidden status of worksheet (what is the
> attribute?). Any ideas?
>
> Thank you very much for any help or direction!
>
> Alex
>
Back to top
Login to vote
JE McGimpsey

External


Since: Jul 13, 2005
Posts: 597



(Msg. 3) Posted: Fri Oct 14, 2005 8:06 am
Post subject: Re: Condition based on worksheet visibility? Please help! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <1129259244.041680.217800 DeleteThis @o13g2000cwo.googlegroups.com>,
juchelka.shopping DeleteThis @verizon.net wrote:

> I have workbook containing several worksheets (Excel for Mac 2004). I
> would like to create formula in cell(s) on one worksheet based on
> visibility (hidden status) of other individual worksheets. Let's say if
> the particular worksheet is hidden, set value to zero, otherwise set
> value to 1. I know how to approach the formula in general, What I don't
> know is, how to check for hidden status of worksheet (what is the
> attribute?). Any ideas?

I've used this User Defined Function in several projects:

Public Function SheetVisible(ByRef reference As Range) As Boolean
Application.Volatile
SheetVisible = reference.Parent.Visible
End Function

To get the result you want, use

=--SheetVisible(Sheet5!A1)

Alternatively, you could rewrite the UDF to return a 1 or 0, but I
prefer to return boolean values as booleans.

Using a range is better than using a worksheet name, since XL will keep
track of the sheet name if it's changed by the user.

Also, this function will not change until a calculation is triggered on
the sheet with the formula, so you may need to hit F9 to get it to
return the correct value.
Back to top
Login to vote
Juchelka

External


Since: Oct 15, 2005
Posts: 10



(Msg. 4) Posted: Sat Oct 15, 2005 6:30 pm
Post subject: Re: Condition based on worksheet visibility? Please help! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thank you guys! That was all I needed. After realizing there is no way
to do it just with formulas (SUBTOTAL would kinda work for me, if it
would also operate on rows, instead just the columns...) I spent few
hours on Friday and did what I needed to do in VB. I am cleaning it up
now and one thing I will try to do to get rid of specific references...
Thanks JE!

Alex

JE McGimpsey wrote:
> In article <1129259244.041680.217800.DeleteThis@o13g2000cwo.googlegroups.com>,
> juchelka.shopping.DeleteThis@verizon.net wrote:
>
> > I have workbook containing several worksheets (Excel for Mac 2004). I
> > would like to create formula in cell(s) on one worksheet based on
> > visibility (hidden status) of other individual worksheets. Let's say if
> > the particular worksheet is hidden, set value to zero, otherwise set
> > value to 1. I know how to approach the formula in general, What I don't
> > know is, how to check for hidden status of worksheet (what is the
> > attribute?). Any ideas?
>
> I've used this User Defined Function in several projects:
>
> Public Function SheetVisible(ByRef reference As Range) As Boolean
> Application.Volatile
> SheetVisible = reference.Parent.Visible
> End Function
>
> To get the result you want, use
>
> =--SheetVisible(Sheet5!A1)
>
> Alternatively, you could rewrite the UDF to return a 1 or 0, but I
> prefer to return boolean values as booleans.
>
> Using a range is better than using a worksheet name, since XL will keep
> track of the sheet name if it's changed by the user.
>
> Also, this function will not change until a calculation is triggered on
> the sheet with the formula, so you may need to hit F9 to get it to
> return the correct value.
Back to top
Login to vote
Display posts from previous:   
Related Topics:
SUMIF with condition empty cells - I am trying to add data when a series of conditions are met. It is valid for one of the cells tested in the SUMIF to be empty and the sum should still be done. However this does not happen unless I make the cells have some value. This could be done..

New worksheet with list - I have created a new document in Excel and inserted a new List. Now in the list wizard I have made a new list on a new work sheet. When you do this it seems to make a blank worksheet with only the columns you specified within the wizard... This worksheet...

Worksheet find - Can I make worksheet2 import all rows from worksheet1 that include the text "- Brice" ? How? dzelnio

Phantom Worksheet Puzzle. - I have created a new spreadsheet in Excel 2000 which involved some copying and pasting from a previous spreadsheet. There are multiple worksheets in the xls. Its fairly complex so don't want to recreate the whole thing again. At one point the copy of a...

Shortcut for Next/Previous Worksheet - I'm trying to find a keyboard shortcut for selecting the next or previous worksheet tab in a workbook. I've looked at the XL Help for keyboard shortcuts and it states that "ctrl + page up/page down" will move to next or previous worksheet. I've...
       Mac (Home) -> Mac Excel All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
 Linux Forums
  Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact