assign formula to a cell

G

Guest

hi. i want to do this:
Worksheets("sheet1").Range("init").Offset(1, -1) = "=blp("SPX Index","last
price")"
but i cant because excel assumes the formula terminates on the second ",
therefore assuming the formula is =blp(

can you help me out?
 
T

Trevor Shuttleworth

Worksheets("sheet1").Range("init").Offset(1, -1) = "=blp(""SPX
Index"",""last price"")"

Regards

Trevor
 
G

Guest

hi.
not sure. =blp does not look like a standard excel function suggesting that
it might be a user defined function. post the UDF.

lunch.
Regards
FSt1
 
R

Rick Rothstein \(MVP - VB\)

.....Offset(1, -1) = "=blp("SPX Index","last > price")"

In a String constant (delineated by quote marks surrounding it), internal
quote marks must be doubled up. So, your code should look like this...

......Offset(1, -1) = "=blp(""SPX Index"",""last > price"")"

That is the rule for all String constants, not just for the way you used it
here.

Rick
 
G

Guest

blp is a function that uses third party software via ddl links. the software
in question is bloomberg which is a market data feeder.

i think the previous post sorted it out.

cheers
 

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