+ Reply to Thread
Results 1 to 3 of 3

Regarding Defined names

Hybrid View

  1. #1
    Registered User
    Join Date
    12-03-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    3

    Post Regarding Defined names

    I have 4 columns

    Sheet Name(Defined Name) Reference To delete
    sheet1 xxxxxxxxxxx yyyyyyyyy x
    sheet1 zzzzzzzzzzzz yyyyyyyyy
    sheet2 eeeeeeeeeeeee yyyyyyyyy x

    Based on the first column it should go to the sheet name(i.e if it is sheet1 it should activete sheet1) and it should identify the names(Insert-name-define) in it and which are marked as to delete it should delete them.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Regarding Defined names

    You don't specify where the data table is stored etc but the below is based on code being invoked from sheet containing the list where data table in A2 onwards

    If as implied you're using XL2003 then...

    Sub Example()
    Dim rngCell As Range
    For Each rngCell In Range(Cells(2, "A"), Cells(Rows.Count, "A").End(xlUp)).Cells
        With rngCell
            If UCase(.Offset(, 3).Value) = "X" Then
                On Error Resume Next
                ThisWorkbook.Names(.Offset(, 1).Value).Delete
            End If
        End With
    Next rngCell
    End Sub

  3. #3
    Registered User
    Join Date
    12-03-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Regarding Defined names

    Thanq for ur reply.

+ 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