Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using vlookup in VBA
Hi,
I am not too hot on translating Excel function on VBA. I am trying to use Vlookup and Hlookup to return a value for each Cell in a selection. How can I declare the functions for them to work in the following way? This is part of the code, where Price and CountryToSearch are defined as Range: Dim Cell As Range For Each Cell In Selection Cell.Offset(0, 10).Value = VLookup(Cell, Price, HLookup (CountryToSearch, Price, 2, False), False) Next Cell Can somebody help? Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
If (Vlookup 0) working, but what if Vlookup cell does not exist | Excel Worksheet Functions | |||
VLookUp - Does the VLookUp return the exact information? | Excel Worksheet Functions | |||
Vlookup in vlookup - taking the result as array name | Excel Worksheet Functions | |||
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) | New Users to Excel | |||
Vlookup info being used without vlookup table attached? | Excel Worksheet Functions |