+ Reply to Thread
Results 1 to 8 of 8

Automatic Caluation or Manual with Bloomberg links

  1. #1
    Registered User
    Join Date
    07-05-2012
    Location
    Winnipeg, Canada
    MS-Off Ver
    Excel 2003
    Posts
    2

    Automatic Caluation or Manual with Bloomberg links

    I have spreadsheet that pulls in data from an external source (Bloomberg). The spreadsheet has about 2000 rows and grabs ~200 data points per row. It then puts these data points into arrays in order to percentile rank the data.

    If I set Excel to automatically calculate formulas it crashes as there is so many calculations going on simultaneously. As a solution, I've created a macro to calculate one column at a time manually. That prevents Excel from crashing, but what I'm finding is that using Range.Calculate doesn't give Bloomberg enough time to return a data value and I get a bunch of "#N/A Requesting Data" errors. If you are running Bloomberg bdp links in Excel with Automatic calculation for a small set of data, the data values will eventually get populated, but because my spreadsheet is so large, I can't set formulas to automatic.

    The solutions I'm think of would be to either a) tell Excel to wait a while for the manual calculation to complete or b) somehow set Excel to Automatic calculations, but do it for only one row at a time.

    Does anyone know whether these are viable options and how to program it?

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Automatic Caluation or Manual with Bloomberg links

    I'm not sure about 2003 version but in 2010 I can right click on any cell within the range of cells where the web query comes in. On that menu is the option "Data Range Properties". When that is clicked a window pops up and there's an option to "Enable background refresh". Removing the check mark from that option may solve your problem.

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Automatic Caluation or Manual with Bloomberg links

    Hi switzarmy,

    Check out the Wait method - or use code like this:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Forum Contributor
    Join Date
    05-25-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    194

    Re: Automatic Caluation or Manual with Bloomberg links

    I think the easiest approach would just to put wait until calculation is complete at the end of your calculations - e.g.;

    Please Login or Register  to view this content.

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Automatic Caluation or Manual with Bloomberg links

    Hi switzarmy,

    To Borrow from medpack:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    07-05-2012
    Location
    Winnipeg, Canada
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Automatic Caluation or Manual with Bloomberg links

    Nope, unforunately these didn't work. It's almost like Bloomberg has returned a value, even if it is "#N/A Requesting Data", so Excel thinks it has completed the calculation. I think I'm going to trying breaking up the spreadsheet into several different sheets. Then perhaps I can calculate one sheet at a time and piece them all back together using paste values.

    What code can I use to set one sheet to Automatically calculate formulas and not the entire workbook?

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Automatic Caluation or Manual with Bloomberg links

    Hi switzarmy,

    The calculate method says that this code will just calculate the sheet:

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    09-16-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Automatic Caluation or Manual with Bloomberg links

    the excel calculation doenst work for bbg links. You need to use the bloomberg refresh button. To incorporate this into your code go to WAPI <GO> on a bloomberg terminal for more info

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1