Hide Sheets Based On Value

Hammer18

New Member
Joined
Dec 21, 2023
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hello, is there VBA that can look at a specific cell (or multiple cells) on each sheet and hide that sheet if the value (or all values in the case of multiple cells) is 0? The cell reference is different on each tab and can change based on data that is added or removed. Each sheet name are different account numbers. Thank you
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Short answer; Yes, that can be done via VBA.
 
Upvote 0
Any idea on the code? I was only able to find if it was the same cell on each tab and nothing regarding multiple cells on one tab. Thank you
 
Upvote 0
You need to 'inform' the code what the logic is to determine what cell(s) to assess for zero values. Is there a pattern, is there something in the sheet name?
 
Upvote 0
I could add a word to the cell left/right of the cell that it needs to look at. Is that what you mean?
 
Upvote 0
Probably best if you could post actual examples of sheets with both single and multiple cells to assess.
 
Upvote 0
1703272873380.png

1703272888524.png
 
Upvote 0
Thanks you for that. Now, is there any way of telling VBA which sheets have multiple balance cells and which ones have only one? And which column they appear in?
 
Upvote 0
Is it possible to share a copy of your file using Google Drive, Dropbox or similar file sharing platform?
 
Upvote 0
Workpaper

I removed all, but four sheets. I figure I could edit the code for the additional sheets on the working copy. "TB" is where the data is going to be pasted and the sheets with the account numbers is what would need to be hidden if there's no balance.
 
Upvote 0

Forum statistics

Threads
1,215,068
Messages
6,122,950
Members
449,095
Latest member
nmaske

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