In Excel, A1 is equal to =B1/ BDP(C11&”Corp”, “ds036”)
Which BDP(Corp, ds036)
is a function and parameters from Bloomberg.
How to use Excel VBA for this formula?
I was trying different ways in VBA to solve my point. One of them is like the line below,
Cells(1,1)=“B1/ BDP(C11&”Corp”, “ds036”)”
An other way I tried, to simplify,
For i=1 to10
Cells(i,1)=“Cells(i,2)/ BDP(cells(i,3)&”Corp”, “ds036”)”
Next
Also, if it can access directly to BDP function. That will be perfect!
Application.Evaluate
to execute your BDP function, or work with the Bloomberg add-in to directly call the functions natively in VBA. If you useApplication.Evaluate
, be sure to fix your issues with quotation marks as identified by other commenters. – Patrick O'Connor