+ Reply to Thread
Results 1 to 2 of 2

Vlookup

  1. #1
    Registered User
    Join Date
    02-22-2006
    Posts
    28

    Vlookup

    Set Rng = lObjInterimWrkSht.Range("$L2:$O1000")
    lStrResult = Application.VLookup("1001001", Rng, 4, False)
    If Not VBA.IsError(lStrResult) Then
    lDblExpensesThisMonthAmt = VBA.Val(lStrResult)
    Else
    lDblExpensesThisMonthAmt = 0
    End If

    It throws error when executing the vlookup function as "Type Mismatch".

    I tried with Application.Worksheetfunction.VLookup and it throws 'Unable to get the VLookup property of the WorksheetFunction class'

    Please anyone can help me out.

  2. #2
    Stefi
    Guest

    RE: Vlookup

    Try double quotes for string:

    > lStrResult = Application.VLookup(""1001001"", Rng, 4, False)


    Regards,
    Stefi

    „mtpsuresh” ezt *rta:

    >
    > Set Rng = lObjInterimWrkSht.Range("$L2:$O1000")
    > lStrResult = Application.VLookup("1001001", Rng, 4, False)
    > If Not VBA.IsError(lStrResult) Then
    > lDblExpensesThisMonthAmt =
    > VBA.Val(lStrResult)
    > Else
    > lDblExpensesThisMonthAmt = 0
    > End If
    >
    > It throws error when executing the vlookup function as "Type
    > Mismatch".
    >
    > I tried with Application.Worksheetfunction.VLookup and it throws
    > 'Unable to get the VLookup property of the WorksheetFunction class'
    >
    > Please anyone can help me out.
    >
    >
    > --
    > mtpsuresh
    > ------------------------------------------------------------------------
    > mtpsuresh's Profile: http://www.excelforum.com/member.php...o&userid=31817
    > View this thread: http://www.excelforum.com/showthread...hreadid=565136
    >
    >


+ 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