-1
$\begingroup$

Good Morning,

I am using the below formula and need some help, how do I change the below strike price (400) to pull from a separate cell (T2) I have on the spreadsheet?

=BDP("odcn8c_*400*_comdty","vega")*I68*50
$\endgroup$

1 Answer 1

2
$\begingroup$

Just concatenate the string (and replace the _ with spaces to form a valid ticker):

=BDP("odcn8c " & T2 & " Comdty", "vega") * I68 * 50
$\endgroup$
5
  • $\begingroup$ After trying this I am getting the following, "#N/A Invalid" $\endgroup$
    – Dominic
    Jun 7, 2018 at 14:18
  • $\begingroup$ with 400 in cell T2 it works for me, unless you have something incorrect in cell I68. $\endgroup$
    – assylias
    Jun 7, 2018 at 14:28
  • $\begingroup$ the value in I68 i don't think would be able to cause an #N/A Invalid result, as that's what bbg returns. $\endgroup$
    – will
    Jun 8, 2018 at 12:57
  • 1
    $\begingroup$ Make sure you have 400 as a string, not as a number. Use text conversion if necessary, example: =TEXT(I68) $\endgroup$
    – Alex C
    Jun 8, 2018 at 13:26
  • $\begingroup$ @Dominic So =BDP("odcn8c 200 Comdty", "vega") works, but =BDP("odcn8c " & T2 & " Comdty", "vega") with 200 in T2 doesn't? $\endgroup$
    – assylias
    Jun 8, 2018 at 15:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.