Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to use a value from one spreadsheet as the lookup value
and the range from another spreadsheet as the range argument? If so, what would the syntax be? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Both workbooks are open?
dim myLookup as range dim myLookupRng as range dim res as variant set mylookup = workbooks("book1.xls").worksheets("sheet1").range( "a1") set mylookuprng = workbooks("book2.xls").worksheets("sheet99").range ("a1:A99") res = application.match(mylookup.value, mylookuprng,0) if iserror(res) then msgbox "not found" else msgbox "Found on row: " & res end if is one way. TK wrote: Is it possible to use a value from one spreadsheet as the lookup value and the range from another spreadsheet as the range argument? If so, what would the syntax be? Thanks -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dave Peterson wrote:
Both workbooks are open? dim myLookup as range dim myLookupRng as range dim res as variant set mylookup = workbooks("book1.xls").worksheets("sheet1").range( "a1") set mylookuprng = workbooks("book2.xls").worksheets("sheet99").range ("a1:A99") res = application.match(mylookup.value, mylookuprng,0) if iserror(res) then msgbox "not found" else msgbox "Found on row: " & res end if is one way. TK wrote: Is it possible to use a value from one spreadsheet as the lookup value and the range from another spreadsheet as the range argument? If so, what would the syntax be? Thanks Works great. Thanks a lot! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need help with Application.WorksheetFunction | Excel Discussion (Misc queries) | |||
Application.WorksheetFunction.Match problem | Excel Worksheet Functions | |||
Application.worksheetfunction | Excel Programming | |||
application.worksheetfunction.vlookup | Excel Programming | |||
Using Application.WorksheetFunction.Ln(...) in VBA | Excel Programming |