Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Vlookup function macro
i have a series of tables that i need to select from, Below is a sample of
the if statement i have written. I need to copy this to multiple cells. Is there a way to write a function macro to do the same thing? =IF($O18=5,VLOOKUP(RateSheetDate,Table_PF_G5_T1,4) ,IF($O18=6,VLOOKUP(RateSheetDate,Table_PF_G6_T1,4) ,IF($O18=7,VLOOKUP(RateSheetDate,Table_PF_G7_T1,4) ,IF($O18=8,VLOOKUP(RateSheetDate,Table_PF_G8_T1,4) ,0)))) |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Vlookup function macro
You may not need a macro. See if this works for you:
=VLOOKUP(RateSheetDate,INDIRECT("Table_PF_G"&$O18& "_T1"),4) The INDIRECT function allows you to create a dynamic range reference based upon the value in cell O18. HTH Elkar "Jack" wrote: i have a series of tables that i need to select from, Below is a sample of the if statement i have written. I need to copy this to multiple cells. Is there a way to write a function macro to do the same thing? =IF($O18=5,VLOOKUP(RateSheetDate,Table_PF_G5_T1,4) ,IF($O18=6,VLOOKUP(RateSheetDate,Table_PF_G6_T1,4) ,IF($O18=7,VLOOKUP(RateSheetDate,Table_PF_G7_T1,4) ,IF($O18=8,VLOOKUP(RateSheetDate,Table_PF_G8_T1,4) ,0)))) |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Vlookup function macro
Works great - Thanks
"Elkar" wrote: You may not need a macro. See if this works for you: =VLOOKUP(RateSheetDate,INDIRECT("Table_PF_G"&$O18& "_T1"),4) The INDIRECT function allows you to create a dynamic range reference based upon the value in cell O18. HTH Elkar "Jack" wrote: i have a series of tables that i need to select from, Below is a sample of the if statement i have written. I need to copy this to multiple cells. Is there a way to write a function macro to do the same thing? =IF($O18=5,VLOOKUP(RateSheetDate,Table_PF_G5_T1,4) ,IF($O18=6,VLOOKUP(RateSheetDate,Table_PF_G6_T1,4) ,IF($O18=7,VLOOKUP(RateSheetDate,Table_PF_G7_T1,4) ,IF($O18=8,VLOOKUP(RateSheetDate,Table_PF_G8_T1,4) ,0)))) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Integrate a Vlookup function in to a macro | Excel Discussion (Misc queries) | |||
Specifying cell(s) for Vlookup Function in Macro | Excel Discussion (Misc queries) | |||
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP | Excel Discussion (Misc queries) | |||
Getting a cell address from Vlookup function in a macro? | New Users to Excel | |||
Adding a Macro to a VLookup Function | Excel Discussion (Misc queries) |