Hello all brand new to coding here:
I am working on trying to set up views for a specific excel worksheet that I have. The worksheet has approximately 300 columns of data that is very cumbersome to navigate through. I have defined a named range for each column and have created some formulas to determine the list of named ranges on specific views eg. "namedrange_1, named range_2" etc.
I've entered some named ranges into the VBA code but noticed around 12 or so listings I get an 1004 Range reference error.
If I split the code into 3 rows and it appears to work. However I would like the code to be automated to what the formulated cell (listing of the named ranges for a specific view).
For example a formulated cell in another sheet currently appears as: "Namedrange_1, NamedRange_2, Etc"
Private Sub CMB_TAKEOFF_BASIC_Click()
Application.ScreenUpdating = False
Sheets("Pipe").Visible = True
Worksheets("Pipe").Activate
Call CMB_All_Click
Columns("B:XFD").Select
Selection.EntireColumn.Hidden = True
Range("NamedRange_1,NamedRange_2).EntireColumn.Hidden = False
Range("NamedRange_13,NamedRange_14).EntireColumn.Hidden = False
ActiveWindow.ScrollColumn = 1
Application.ScreenUpdating = True
End Sub
Looking for code to reference the named ranges list from calculation within an excel worksheet so I don't have to manually change the code every time a view is modified.