Possible to have a formula to show "TRUE"/"FALSE" depending on sheet visibility?

povictory

New Member
Joined
May 28, 2015
Messages
41
Hello!

Is there a way to have an output in a cell show "True" or "False" depending on if another tab is visible or not visible? I'm looking to leverage that output for some other formulas/conditional formatting, but I only want to do that if another specific tab is visible and available to the user.

Any assistance is greatly appreciated!
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
I think you'll have to use code. Here's one example
 
Upvote 0
I think you'll have to use code. Here's one example
Thanks...I actually found that in a search before posting, but I can't get it to work for me. The formula returns a #VALUE! error for some reason.
 
Upvote 0
Post what you tried and the function call you used?
 
Upvote 0
Thanks...I actually found that in a search before posting, but I can't get it to work for me. The formula returns a #VALUE! error for some reason.
I try it and it works well.
Maybe you have something wrong in the formula.
Excel Formula:
=if(issheetvisible('sheet2'!a1),TRUE,FALSE)
Do you actually have the sheet named "sheet2" ?
 
Upvote 0
Assum sheet name "ABC" need to check visible or not

In any cell of active sheet, type

Code:
=Visible("ABC")
returns TRUE if visible, FALSE invisible

Code:
VBA Code:
Option Explicit
Function Visible(ws)
Application.Volatile
If Not Evaluate("=isref('" & ws & "'!A1)") Then
    Visible = "sheet does not exist!"
    Exit Function
End If
Visible = (Sheets(ws).Visible = True)
End Function

 
Upvote 0
Thanks for the replies to help sort this out! I realized what I was doing wrong - I was using the sheet code in the formula instead of the name in the tab. So I was able to get it to work. However, one issue I'm seeing now is that you actually have to manually trigger the formula to update the formula output. Is there a way to trigger the formula output to update automatically when the sheet is hidden or unhidden?
 
Upvote 0
How that tab was forced to hide / unhide? manual of by another macro?
If manual hide, use that tab deactivate event ( or active sheet activate event) to trigger to input value TRUE/FALSE into active sheet
If by another macro, add a line to input value TRUE/FALSE into active sheet
 
Upvote 0
There's another macro that unhides it when a hyperlink to the tab is clicked from another sheet. Apologies, but could you share how adding the additional line would look in the code?
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,383
Members
448,955
Latest member
BatCoder

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top