+ Reply to Thread
Results 1 to 5 of 5

Hide Sheets Based on Cell Value is Hiding Sheets based on Their Tab Position...Help

  1. #1
    Registered User
    Join Date
    01-06-2021
    Location
    USA
    MS-Off Ver
    2013
    Posts
    6

    Hide Sheets Based on Cell Value is Hiding Sheets based on Their Tab Position...Help

    I am currently using the following code to hide unused sheets based on cell value "" in Range "C5:C105". The tabs are named 1-100 and I am using Range "B5:B105" as a reference for the code. Issue is this: When the code runs and there is no value in C5, instead of sheet.name 1 (sheet1) being hidden, sheet(101) gets hidden because it is in position 1 in the tab list at the bottom of the workbook. The code works fine if the tabs are A,B,C...and reference Range is A,B,C...but I would like it to work using 1,2,3...Any Ideas?

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    11-29-2022
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    435

    Re: Hide Sheets Based on Cell Value is Hiding Sheets based on Their Tab Position...Help

    Maybe this:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-06-2021
    Location
    USA
    MS-Off Ver
    2013
    Posts
    6

    Re: Hide Sheets Based on Cell Value is Hiding Sheets based on Their Tab Position...Help

    Thomglea, That just prevented the sheets from being hidden after they were visible and it is still wanting to unhide sheets based on their TAB positions on the bottom...I may have found a glitch in the sheet hiding matrix

  4. #4
    Valued Forum Contributor
    Join Date
    11-29-2022
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    435

    Re: Hide Sheets Based on Cell Value is Hiding Sheets based on Their Tab Position...Help

    Nah, just gotta figure out your conditionals. The code below will do what you want by only looking at column C and determining if the cell is blank or not. Change the range to match yours (I made mine small for testing purposes. I was not going to make 100 sheets )

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-06-2021
    Location
    USA
    MS-Off Ver
    2013
    Posts
    6

    Re: Hide Sheets Based on Cell Value is Hiding Sheets based on Their Tab Position...Help

    THANK YOU! You're Brilliant.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Hiding Columns and sheets based on value of a cell in another sheet
    By Hardcanuck in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-11-2020, 04:37 PM
  2. [SOLVED] Hide sheets based on the cell value
    By BJK1903 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-23-2016, 04:06 PM
  3. Hide row in other sheets based on cell value
    By DaveLet in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-27-2014, 08:01 PM
  4. Hiding Sheets based on cell value, only hiding last sheet
    By mattblack2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-17-2014, 03:21 PM
  5. [SOLVED] hide sheets based on the cell value
    By sknalodz in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-24-2013, 01:43 AM
  6. Hiding sheets based on value in dropdown cell
    By MrSandman in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 03-27-2007, 05:13 PM
  7. Hide sheets based on cell value input
    By EdMac in forum Excel General
    Replies: 10
    Last Post: 11-17-2006, 06:01 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1