ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   vlook up and return formula (https://www.excelbanter.com/excel-worksheet-functions/219734-vlook-up-return-formula.html)

JE

vlook up and return formula
 
Is it possible to use vlookup to return a formula? Here is my scenario:

Spreadsheet 1

Column A Column B Column C
Equity C ABC123
Muni 912822xd
Moneymkt 8145332x
Option jpm-42

Spreadsheet 2

Column A Column B Column C Column D
Equity concatenate(B2,"
","EQUITY")
Muni concatenate(C2,"
","GOVT")
Moneymkt concatenate(C2,"
","GOVT")
Option concatenate(B2,"
","OPT")

My goal is to vlookup in spreadsheet 1 on column a and return from
spreadsheet 2 the formula in column D.

Many thanks


Pete_UK

vlook up and return formula
 
I don't know why you need to do it that way - put this in D1 of
Sheet1:

=IF(A1="Equity",B2&" EQUITY",IF(OR(A1="Muni",A1="Moneymkt"),C2&"
GOVT"),IF(A1="Option",B2&" OPT","")))

then copy it down as required.

Hope this helps.

Pete

On Feb 8, 8:57*pm, JE wrote:
Is it possible to use vlookup to return a formula? *Here is my scenario:

Spreadsheet 1

Column A * * * Column B * * *Column C * * *
Equity * * * * * * * *C * * * * * * ABC123 * * * * *
Muni * * * * * * * * * * * * * * * * 912822xd * * *
Moneymkt * * * * * * * * * * * * 8145332x * * *
Option * * * * * * * jpm-42 * * * * * * * * * * * * *

Spreadsheet 2

Column A * * * Column B * * *Column C * * *Column D
Equity * * * * * * * * * * * * * * * * * * * * * * * * * *concatenate(B2,"
","EQUITY")
Muni * * * * * * * * * * * * * * * * * * * * * * * * * * *concatenate(C2,"
","GOVT")
Moneymkt * * * * * * * * * * * * * * * * * * * * * * *concatenate(C2,"
","GOVT")
Option * * * * * * * * * * * * * * * * * * * * * * * * * concatenate(B2,"
","OPT")

My goal is to vlookup in spreadsheet 1 on column a and return from
spreadsheet 2 the formula in column D. *

Many thanks



Greg Wilson

vlook up and return formula
 
Pete, I believe your formula has an erroneous parenthesis after C2&"GOVT". I
think you meant this:
=IF(A1="Equity",B2&"
EQUITY",IF(OR(A1="Muni",A1="Moneymkt"),C2&"GOVT",I F(A1="Option",B2&"
OPT","")))

Cheers,
Greg


"Pete_UK" wrote:

I don't know why you need to do it that way - put this in D1 of
Sheet1:

=IF(A1="Equity",B2&" EQUITY",IF(OR(A1="Muni",A1="Moneymkt"),C2&"
GOVT"),IF(A1="Option",B2&" OPT","")))

then copy it down as required.

Hope this helps.

Pete

On Feb 8, 8:57 pm, JE wrote:
Is it possible to use vlookup to return a formula? Here is my scenario:

Spreadsheet 1

Column A Column B Column C
Equity C ABC123
Muni 912822xd
Moneymkt 8145332x
Option jpm-42

Spreadsheet 2

Column A Column B Column C Column D
Equity concatenate(B2,"
","EQUITY")
Muni concatenate(C2,"
","GOVT")
Moneymkt concatenate(C2,"
","GOVT")
Option concatenate(B2,"
","OPT")

My goal is to vlookup in spreadsheet 1 on column a and return from
spreadsheet 2 the formula in column D.

Many thanks




Pete_UK

vlook up and return formula
 
Yes, thanks for pointing that out, Greg.

Pete

On Feb 8, 10:16*pm, Greg Wilson
wrote:
Pete, I believe your formula has an erroneous parenthesis after C2&"GOVT".. I
think you meant this:
=IF(A1="Equity",B2&"
EQUITY",IF(OR(A1="Muni",A1="Moneymkt"),C2&"GOVT",I F(A1="Option",B2&"
OPT","")))

Cheers,
Greg



"Pete_UK" wrote:
I don't know why you need to do it that way - put this in D1 of
Sheet1:


=IF(A1="Equity",B2&" EQUITY",IF(OR(A1="Muni",A1="Moneymkt"),C2&"
GOVT"),IF(A1="Option",B2&" OPT","")))


then copy it down as required.


Hope this helps.


Pete


On Feb 8, 8:57 pm, JE wrote:
Is it possible to use vlookup to return a formula? *Here is my scenario:


Spreadsheet 1


Column A * * * Column B * * *Column C * * *
Equity * * * * * * * *C * * * * * * ABC123 * * * * *
Muni * * * * * * * * * * * * * * * * 912822xd * * *
Moneymkt * * * * * * * * * * * * 8145332x * * *
Option * * * * * * * jpm-42 * * * * * * * * * * * * *


Spreadsheet 2


Column A * * * Column B * * *Column C * * *Column D
Equity * * * * * * * * * * * * * * * * * * * * * * * * * *concatenate(B2,"
","EQUITY")
Muni * * * * * * * * * * * * * * * * * * * * * * * * * * *concatenate(C2,"
","GOVT")
Moneymkt * * * * * * * * * * * * * * * * * * * * * * *concatenate(C2,"
","GOVT")
Option * * * * * * * * * * * * * * * * * * * * * * * * * concatenate(B2,"
","OPT")


My goal is to vlookup in spreadsheet 1 on column a and return from
spreadsheet 2 the formula in column D. *


Many thanks- Hide quoted text -


- Show quoted text -




All times are GMT +1. The time now is 06:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com