Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hlookup with Variable.

Status
Not open for further replies.

Ksquared

Technical User
Mar 24, 2002
12
0
0
AU
Hello All.
Having a go at some VBA Excel 2010, and hit a roadblock.

If asmblyCode = Application.WorksheetFunction.HLookup(asmblyCode,Sheet3!B$2:!S$3', 1, False) Then
So, im trying to do a lookup for the variable asmblyCode on sheet3 B2-S3 on the first row.
I get a list separator or ) error.

Im not sure what is causing it......
Appreciate your help.
 
hi,
Code:
If asmblyCode = Application.WorksheetFunction.HLookup(asmblyCode,[highlight]Sheets("Sheet3").Range(B$2:S$3")[/highlight], 1, False) Then

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Hi Skip

should there be a doublequote before the B$2 to match the one after the $3?

Sheets("Sheet3").Range(B$2:S$3")
^

Ernest

Be Alert, America needs more lerts
 

Code:
Sheets("Sheet3").Range([highlight]"[/highlight]B$2:S$3")

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top