Hi everybody, thanks for the cooperation.
I now have some progress, the error value is 2042,
on the line begins with LUResults = (see below)
but it does not afect the flow of the macro.
Except that later on I have the line
MsgBox LUResults there the macro stucks and the error note is
type mismatch error no 13
I have excel2000 and windows xp
The entire macro is
Sub VLU()
Dim Taarich As Date ' Taarich is Date in Hebrew
Dim LUResults As Variant
Dim LupTable As Range
Set LupTable = Workbooks("book2.xls").Sheets("sheet1").Range("Table01")
Taarich = ActiveCell.Offset(0, -1).Value
LUResults = Application.VLookup(Taarich, LupTable, 3, True)
MsgBox LUResults
End Sub
Any mor help, please.........
rachel
Niek Otten said:
Hi Rachel,
Worked OK for me in Excel 2003
Sorry!
application.WorksheetFunction.VLookup(workbooks("book1").worksheets("sheet1"
).range("a1"),workbooks("book2").worksheets("sheet1").range("table01"),2)
--
Kind regards,
Niek Otten
I want to get the vlookup results to a variable, where that table data
is
in
book2
and the key search is in book1 somthing like
Vlook = application.worksheet.vlookup(book1!sheet1[a1],
book2!sheet1[table01], 2)
this does not work. Both worbooks are in the same directory, and I use
excel
2000
and windoew xp
thanks rachel