View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default VLookUp Function

You need to remove missingSAPlines from the below code...

Application.WorksheetFunction.VLookup(dbec.Offset( 0, 3).Value, rngsml,
2,False) & missingSAPlines

If this post helps click Yes
---------------
Jacob Skaria


"Ayo" wrote:

Nothing happened. I don't understand how this is supposed to help me?

"Jacob Skaria" wrote:

Please try this.

Suppose you have data in A1:B2.

ColA ColB
1 One
2 Two

In immediate window try this

Msgbox
Application.WorksheetFunction.VLookup(Range("A1"), Range("A1:B2"),2,False)


--
If this post helps click Yes
---------------
Jacob Skaria


"Ayo" wrote:

I am get this error message:
"Unable to get the VLookup property of the WorksheetFunction class"
when the code gets to the Application.WorksheetFunction line below. I
sense there is something wrong but I can't put my finger on it.
Any ideas?
Thanks

Set smlWS = Worksheets("SAP Materials List")
smllastRow = smlWS.Range("B65536").End(xlUp).Row
Set rngsml = smlWS.Range("B2:C" & smllastRow)

Application.WorksheetFunction.VLookup(dbec.Offset( 0, 3).Value, rngsml, 2,
False) & missingSAPlines

 
ExcelBanter Database Error
Database Error Database error
The ExcelBanter database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.excelbanter.com home page, then try to open another page.
  • Click the Back button to try another link.
The www.excelbanter.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.