Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
VLOOKUP in VB
Hi,
I have a vlookup in VB and I'm pretty sure it's working, except it returns a #N/A as the result. I'm pretty sure this is because of the "format" I am using, but I'm not sure how to change it. I'm looking up a date from one column, finding it in another and returning the second column (a percent with up to 5 decimals). What should I be using to get this to work: Sub GetRates() Dim Row As Integer Dim Dates As Date Dim Libor As Date Row = 3 Dates = Sheets("Libor").Cells(Row, 2).Value Libor = Application.VLookup(Worksheets("Libor").Cells(Row, 2).Value, Worksheets("BB").Range("B:C"), 2, False) Cells(Row, 3).Value = Libor End Sub I have Row as a variable because I will be adding to it. Thanks, Brett |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
VLOOKUP in VB
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VLookup a Vlookup | Excel Worksheet Functions | |||
VLOOKUP Problem | Excel Discussion (Misc queries) | |||
VLOOKUP Limitations | Excel Worksheet Functions | |||
Have Vlookup return a Value of 0 instead of #N/A | Excel Worksheet Functions | |||
vlookup data hidden within worksheet | Excel Worksheet Functions |