+ Reply to Thread
Results 1 to 4 of 4

Automate report so macro produces new vlookup and column based upon prior months data

  1. #1
    Registered User
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    18

    Automate report so macro produces new vlookup and column based upon prior months data

    Hi Guys thanks for the help in advance.

    Let me first explain what I am trying to do:

    I am using a software to extract data and then I dump that data it into my excel template. After the data is dumped I would like the macro to run through the data sheet and import the relevant month’s data into the actually report which is in the same workbook but different tab (just to simplify this process). I have created a macro that can successfully do this however, I would have to go back into the macro and update parameters for the following months that I want avoid.

    Problems with code-

    Once I have dumped the data and run the first part,
    I go into my reporting tab I need the macro to select cell “A2” and go to the last column and then copy and paste the previous column in that new column (but right now my macro won’t do that as it is fixed to rows/columns BB2:BB43 and will copy everything from that column to BC2:BC43)

    The second problem is my vlookup which I use to bring in the new data. Same problem as the I described earlier. My vlookup is fixed (BC2:BC43 which is the new column) I would need to the vlookup to be update to the new column every time this macro is run. Along with copying/paste-values to remove it once, it is done so I can clear the errors and removing errors for the new column.


    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    08-04-2011
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2007
    Posts
    109

    Re: Automate report so macro produces new vlookup and column based upon prior months data

    This should get you started:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Automate report so macro produces new vlookup and column based upon prior months data

    Dionysos thanks for the reply. I am unclear of what your code is suppose to do. I have tested it a few times and it seems unresponsive please advise. Thanks!

  4. #4
    Forum Contributor
    Join Date
    08-04-2011
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2007
    Posts
    109

    Re: Automate report so macro produces new vlookup and column based upon prior months data

    I have provided a code snippet to duplicate the last column in the REPORTS sheet without hardcoding the range. This will replace the following:
    Please Login or Register  to view this content.
    You can leverage this piece for the second problem you referenced. Without having the workbook to work with it makes it difficult to provide the complete error free solution.

+ 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