I want to write a Bloomberg formula in an excel cell with VBA. The formula, if written in the Cell directly "by hand", works as intended. I tried the following Code:
isin = Cells(ActiveCell.Row, 6).Value
Cells(ActiveCell.Row, 37).Value.Formula = "=BDP(""" & isin & " ISIN"";""SHORT_NAME"")"
but I get an error 424 (object required).
If I try using only .Value or .Formula (I found a lot examples like this online) like:
Cells(ActiveCell.Row, 37).Value = "=BDP(""" & isin & " ISIN"";""SHORT_NAME"")"
or
Cells(ActiveCell.Row, 37).Formula = "=BDP(""" & isin & " ISIN"";""SHORT_NAME"")"
I get an error 1004 (Application-defined or Object-defined error)