+ Reply to Thread
Results 1 to 2 of 2

Debugging new function code - vlookallsheets

  1. #1
    Registered User
    Join Date
    09-30-2009
    Location
    rochester, ny
    MS-Off Ver
    Excel 2007
    Posts
    1

    Debugging new function code - vlookallsheets

    I've been trying to get this function to work but with no luck. Can anyone tell me what might be wrong with it? Also, how do I add this to my list Excel formulas? I've tried to save it as an Add-In but it doesn't take.

    Sub VLOOKAllSheets()

    Dim wSheet As Worksheet

    Dim vFound



    On Error Resume Next



    For Each wSheet In ActiveWorkbook.Worksheets
    With wSheet
    Set Tble_Array = .Range(Tble_Array.Address)
    vFound = WorksheetFunction.VLookup _
    (Look_Value, Tble_Array, _
    Col_num, Range_look)
    End With
    If Not IsEmpty(vFound) Then Exit For
    Next wSheet



    Set Tble_Array = Nothing

    VLOOKAllSheets = vFound

    End Sub


    Thanks in advance for any help.

    Bryan

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Debugging new function code - vlookallsheets

    Welcome to the forum.

    Please take a few minutes to read the forum rules, and then edit your post to add code tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

+ 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