Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default VLookUp Function

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default VLookUp Function

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default VLookUp Function

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to combine Combo Box function with Vlookup function KH Excel Worksheet Functions 2 April 5th 10 01:24 PM
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION CHAIM Excel Worksheet Functions 1 July 27th 05 09:10 PM
how do I write a vlookup function within an iserror function so t. JBLeeds Excel Worksheet Functions 2 March 16th 05 10:30 AM
I want to use Vlookup function and AND function in a single formu. prakash Excel Worksheet Functions 3 January 25th 05 07:11 AM


All times are GMT +1. The time now is 08:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"