ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   assign formula to a cell (https://www.excelbanter.com/excel-programming/392232-assign-formula-cell.html)

ALVESM

assign formula to a cell
 
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?

Trevor Shuttleworth

assign formula to a cell
 
Worksheets("sheet1").Range("init").Offset(1, -1) = "=blp(""SPX
Index"",""last price"")"

Regards

Trevor


"ALVESM" wrote in message
...
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?




FSt1

assign formula to a cell
 
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

"ALVESM" wrote:

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?


Rick Rothstein \(MVP - VB\)

assign formula to a cell
 
.....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


ALVESM

assign formula to a cell
 
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

"FSt1" wrote:

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

"ALVESM" wrote:

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?



All times are GMT +1. The time now is 03:43 AM.

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