Hi
I would like to insert a formula "=VLOOKUP(DATA_MAIN_SECURITY&" Equity";BPS_DATA;4;FALSE)" in a cell using the named ranges DATA_MAIN_SECURITY and BPS_DATA respectively
But i keep on getting an error = "Application error or object-defined error"
Would appreciste any help available. Thanks in advance!
My code is as follows:
VBA Macro Code To Insert Formula Into Named Range
-
-
-
Re: inserting formula w/ named range using VBA code
Record a macro entering your RELATIVE formula. Name the range you formula should reside in and modify code below;
-
Re: inserting formula w/ named range using VBA code
Hi
I am actually trying to avoid using RELATIVE formula in the code and compose it in its entirety using named ranges, is that even possible?
"=VLOOKUP(DATA_MAIN_SECURITY&" Equity";BPS_DATA;4;FALSE)"
whereby DATA_MAIN_SECURITY and BPS_DATA are named ranges (one in the same sheet, other in a another sheet, same workbook) -
Re: VBA Macro Code To Insert Formula Into Named Range
Why do you want the same formula and result repeated over and over? Surely you need a relative range for the lookup value?
-
Re: VBA Macro Code To Insert Formula Into Named Range
ie.
i have a named range DATA_MAIN_SECURITY .... it is a column of data.
I would like to create a macro that populates a cell beside each information to vlookup the info in BPS_DATA which resides in another sheet.
I have problem getting vba to insert the formula since apparently i cannot simply use the formula i see in the excel cell itself, neither can i record a macro when there is a named range used in the formula.
so i'm basically stuck ... -
-
Re: VBA Macro Code To Insert Formula Into Named Range
Have you tried replacing the semi-colons with commas?
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!