+ Reply to Thread
Results 1 to 4 of 4

Help! Macro to consolidate data from multiple workbook sheets!

  1. #1
    Registered User
    Join Date
    05-07-2012
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    2

    Help! Macro to consolidate data from multiple workbook sheets!

    Hello Everyone!

    I'm having a few problems with a macro that I use to consolidate data from multiple sheets. The macro works extremely well, but the problem is that a majority of the cells are formula based, not a direct value. So it ends up copying the cell formula rather than the actual value.

    I looked through this forum for help and found several similar topics that suggest using paste special or use the .value property. However, I am confused about how to integrate that with my code! So I'm hoping that I can find help over here!

    What the macro does/should do :
    Copy the 12th Row of each sheet, from A12 to CI12, paste into the main excel.


    The relevant part of the macro is :

    Please Login or Register  to view this content.
    Any help is greatly appreciated!

    Sincerely,
    Sai
    Last edited by Sainath Krishnan; 05-07-2012 at 11:33 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Help! Macro to consolidate data from multiple workbook sheets!

    This line of code is the problem:
    Please Login or Register  to view this content.
    VBA 101 - when you do a COPY/PASTE in a single line of code, the entire cell is copied as is.

    Solutions:

    1) Don't do copy/paste, do a .Value transfer
    Please Login or Register  to view this content.


    2) Use two lines of code, one to copy, the other to pastevalues
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    05-07-2012
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Help! Macro to consolidate data from multiple workbook sheets!

    Yeah I figured that was the problem, but I had no idea how to integrate that into my existing code! Thank you so much for the quick reply! It worked like a charm.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Help! Macro to consolidate data from multiple workbook sheets!

    If that takes care of your need, please select Thread Tools from menu above and set this topic to SOLVED.

+ 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