reference to a cell within a string

S

susan hayes

I have written the following:

If [b2] = 5 Then [b3] = "blp(""GE Equity"",""Last Price"")"
Else [b3] = ""

giving me the wanted result: blp("GE Equity","Last Price")

My question is, lets say I would like to reference cell [b4] = IBM, in
order to replace GE in this string.

to give me the result: blp("IBM Equity","Last Price")

Thank you,

Susan
 
G

Guest

Yikes! Just noticed a typo.
should be:
"blp(""" & [b4] & " Equity"",""Last Price"")"

K Dales said:
If [b2] = 5 Then [b3] = "blp(""" & "[b4] & " Equity"",""Last Price"")"

susan hayes said:
I have written the following:

If [b2] = 5 Then [b3] = "blp(""GE Equity"",""Last Price"")"
Else [b3] = ""

giving me the wanted result: blp("GE Equity","Last Price")

My question is, lets say I would like to reference cell [b4] = IBM, in
order to replace GE in this string.

to give me the result: blp("IBM Equity","Last Price")

Thank you,

Susan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top