+ Reply to Thread
Results 1 to 5 of 5

VBA code to hide defined names in worksheet

Hybrid View

lealea1982 VBA code to hide defined... 11-04-2010, 01:09 PM
StephenR Re: VBA Loops 11-04-2010, 01:25 PM
lealea1982 Re: VBA code to hide defined... 11-04-2010, 01:31 PM
StephenR Re: VBA code to hide defined... 11-04-2010, 01:51 PM
lealea1982 Re: VBA code to hide defined... 11-05-2010, 06:01 AM
  1. #1
    Registered User
    Join Date
    10-23-2007
    Posts
    80

    Re: VBA code to hide defined names in worksheet

    That works brilliantly thank you, but unfortunately I do have a few other named ranges throughout the workbook. Is it possible to apply this macro to the active sheet only?

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: VBA code to hide defined names in worksheet

    If the others don't start with Goto, this should work.
    Sub x()
    
    Dim n As Name
    
    For Each n In ThisWorkbook.Names
        If UCase(Left(n.Name, 4)) = "GOTO" Then
            If WorksheetFunction.Sum(Range(n)) = 0 Then Range(n).EntireRow.Hidden = True
        End If
    Next n
    
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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