Excel macro to get data from Bloomberg

jonasJWS

New Member
Joined
Aug 8, 2014
Messages
2
Hey!

I have the following macro that loops through 100 tickers in sheet 1, gets the trades for each, pushes each ticker's trades to sheet 2 to create a list of all trades. The problem is that I just get a #N/A requesting data for each ticker. This seems to be a wider problem with fetching external data from Bloomberg. However, I cannot seem to gete a fix for it. Any help would be much appreciated :)

Sub Macro()
On Error Resume Next
Sheet2.Range("B3:E65536").ClearContents
Application.Calculation = xlCalculationManual
For Y = 4 To Sheet1.Range("A65536").End(xlUp).Row
Sheet3.Range("C4") = Sheet1.Cells(Y, 1) & " L3 Equity"
Sheet3.Range("C9:F65536").ClearContents
Calculate
If Sheet3.Range("C9") <> "" Then
For Z = 9 To Sheet3.Range("C65536").End(xlUp).Row
Sheet2.Range("B65536").End(xlUp).Offset(1, 0) = Sheet3.Range("C4")
Sheet2.Range("C65536").End(xlUp).Offset(1, 0) = Sheet3.Cells(Z, 3)
Sheet2.Range("D65536").End(xlUp).Offset(1, 0) = Sheet3.Cells(Z, 4)
Sheet2.Range("E65536").End(xlUp).Offset(1, 0) = Sheet3.Cells(Z, 5)
Next
End If
Next
Application.Calculation = xlCalculationAutomatic
End Sub
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,216,381
Messages
6,130,294
Members
449,570
Latest member
TomMacca52

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top