+ Reply to Thread
Results 1 to 4 of 4

Error with Data Dump Macro

  1. #1
    Registered User
    Join Date
    05-26-2009
    Location
    new york
    MS-Off Ver
    Excel 2007
    Posts
    76

    Error with Data Dump Macro

    Hello,

    I have a model which I have created a macro for that will do a data dump of the date when I hit 'update' (on BBG Raw Data Tab) to Column A in the 'Data for Pivot' Tab. This works fine and all of the data comes over, except the last two data points in BBG Raw data (Cell A5055 and A5056) do not come across into the 'Data for Pivot' Tab (these should be going into Cell A5054 and A5055 of the 'Data for Pivot' tab). Would anyone be kind enough to take a look at the worksheet and the macros that I have written and let me know if they can come across the error? I have inserted the link to the file below.

    Thanks,

    Maani

    http://www.4shared.com/file/11800545...g_Average.html
    Last edited by maani; 07-14-2009 at 08:10 PM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Error with Data Dump Macro

    Try this. I think your code can be shortened and simplified a little and I have taken the liberty.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-26-2009
    Location
    new york
    MS-Off Ver
    Excel 2007
    Posts
    76

    Re: Error with Data Dump Macro

    Wow, thanks so much Stephen! It works perfectly now. What was the reason it wasn't capturing the last two data points? Also, when I hit update, the worksheet runs much quicker; did the code you put in have anything to do with this?

    Thanks again,

    Maani

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Error with Data Dump Macro

    Glad it worked.

    In your code you were counting the number of non-empty cells but not allowing for blank cells at the top.

    The turning off of screen updating and calculation speeds up code. Removing Select statements, which tend to be thrown up the macro recorder, has a similar effect.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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