•1 min read•from Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community
Macro to bulk Hide/Unhide groups of tabs
I'm working in a large financial statement file with several fund and feeder funds in the same workbook. I have a simple macro to hide/unhide based on the prefix of the tab name but I'm looking for ways to better group the tabs.
Currently I have one macro to hide & one to unhide per prefix (neither is terrible complex because I'm not skilled in VBA). This requires each tab in that group to have the same prefix which runs into character limits as well as it not being very dynamic.
I'm trying to create a way to list the tabs in a table with a group number (1, 2, 3), then have an adjacent button to hide/unhide that group. Where can I start?
Sub Hide_MainFund_Tabs() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets If ws.Name Like "Main Fund*" Then ws.Visible = xlSheetHidden End If Next ws End Sub Sub Unhide_MainFund_Tabs() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets If ws.Name Like "Main Fund*" Then ws.Visible = xlSheetVisible End If Next ws End Sub [link] [comments]
Want to read more?
Check out the full article on the original site
Tagged with
#Excel alternatives for data analysis
#natural language processing for spreadsheets
#generative AI for data analysis
#financial modeling with spreadsheets
#rows.com
#financial modeling
#Excel compatibility
#large dataset processing
#cloud-based spreadsheet applications
#no-code spreadsheet solutions
#Excel alternatives
#macro
#tabs
#hide/unhide
#Main Fund
#unhide
#hide
#financial statement
#prefix
#workbook