Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro to find the closest value
Hi all,
I am writing a program with vba and I need your help! I need to find the closest value to a value enter by the user. I have load values in column C, the user enter a value for the load. I need to find the closest value in columns C and the corresponding value of voltage that is in column G. I need to do that in a macro, I tried vlookup but it doesn't work.. give me type mismatch. Here is the piece of code... tabledata = Range(Worksheets("data").Cells(1, "C"), Worksheets("data").Cells(lastrow, "G")) finfat = Application.VLookup(finalprefat, tabledata, "G", True) finalprefat is enter by the user.... Thanks for your help! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find number closest to 0 | Excel Discussion (Misc queries) | |||
Array Lookup to Find Closest Date and Next Closest Date | Excel Worksheet Functions | |||
Find the closest value | Excel Programming | |||
Find closest value | Excel Programming | |||
How do I find a column entry closest to a particular value | Excel Discussion (Misc queries) |