+ Reply to Thread
Results 1 to 4 of 4

Consolidating several sheets data

  1. #1
    Registered User
    Join Date
    06-26-2015
    Location
    St.Paul, Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    37

    Consolidating several sheets data

    Hi, i've got a code that consolidates all of the data within several sheets in a workbook, and creates a new sheet titled "Combined" with all the compiled data. It also trims the data (removes a couple unnecessary columns and rows) and does a few other tweaks to make it look more presentable. However, as I must update this data every month, I've noticed an error with my new data not being properly combined. The error i'm seeing is this: All of sheet 1 is properly copied and pasted, except beginning at sheet 2, the FIRST row of data is not copied over and the LAST row of data is only copying a portion. This error seems to repeat throughout the rest of the sheets. Here's my code:
    Please Login or Register  to view this content.
    The attachment is made with dummy data that hopefully portrays the issue, however the code should not be ran on this attachment, it will not work properply, rather I'll explain the results of the code with my original file.

    After the above code is ran, all of sheet 1 is copied properly into the new "Combined" sheet, but note starting at SHEET 2, COMPANY 23 is not included in the combined sheet, and yet it skips it and continues with COMPANY 24 then towards the bottom of SHEET 2, COMPANY 67 name is copied properly, but only ITEM REQUIRED 90 is pasted into the combined sheet. This error seems to replicate throughout.

    Any help is greatly appreciated!! Thanks!

    Mark excel tickler.xlsx
    Last edited by murp5972; 08-05-2015 at 10:26 AM.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Consolidating several sheets data

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-26-2015
    Location
    St.Paul, Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Consolidating several sheets data

    Thanks John, I tried your code but it resulted in the same issue.
    My previous code here:
    Please Login or Register  to view this content.
    I've just made the following changes-



    I just tried deleting:
    Please Login or Register  to view this content.
    and changing:
    Please Login or Register  to view this content.
    to:
    Please Login or Register  to view this content.
    It seems to have done the trick thus far, but i'm not entirely sure why. [/COLOR]
    Last edited by murp5972; 08-05-2015 at 01:21 PM.

  4. #4
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Consolidating several sheets data

    Hi,

    .. I was taking a look at this and struggling a bit without having actual data to work on.
    .. and I see in the meantime JOHN H. DAVIS has come in
    .. FWIW my suggestion was going to be along the lines of that :
    . a ) it is dangerous to use the .CurrentRegion as this will give the “box” which only extends to catch / encompasses A1 and any cells “attached” to it. – So it will not catch any rows or columns where there is no linking cell, ( if that makes sense. )
    . b) using .UsedRange is better – this will give the “box” which extends to catch any cell or row ever used ( except that it will not catch deleted rows or columns )

    .

    .. so b) is what you should be using.
    .
    . I think that ties up with what JOHN H. DAVIS has done ( Also he has tidied up a bit , knocking out unnecessary .Select bits and using (3) instead of (xlup) etc. ). He has a lot better idea than me so I am surprised his code is not working for you. ... maybe your (10) found solution is giving the Tip.. your code using a) was not catching the correct entire range for reasons i discussed, so using (10) increased it to the correct range. But that may not always work.
    .
    . Hope that may help point in the direction. Difficult as i said to check without actual data

    Alan
    '_- Google first, like this _ site:ExcelForum.com Gamut
    Use Code Tags: Highlight code; click on the # icon above,
    Post screenshots COPYABLE to a Spredsheet; NOT IMAGES PLEASE
    http://www.excelforum.com/the-water-...ml#post4109080
    https://app.box.com/s/gjpa8mk8ko4vkwcke3ig2w8z2wkfvrtv
    http://excelmatters.com/excel-forums/ ( Scrolll down to bottom )

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. consolidate the all the data to one sheet
    By sriku in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-29-2014, 01:22 PM
  2. [SOLVED] Match Issue - Consolidate Columns of Data With Match/Index/etc?
    By excelsior123 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-03-2014, 05:14 PM
  3. [SOLVED] VBA to consolidate/match data within a sheet
    By nawGo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-13-2014, 03:27 PM
  4. Consolidate Data from one sheet
    By esperanto in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-18-2013, 02:57 AM
  5. [SOLVED] Consolidate Data from 1 Range on 1 Sheet in Multiple Workbooks to Master Workbook Sheet
    By Jennasis in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-10-2013, 06:11 AM
  6. [SOLVED] Consolidate data from multiple sheet to one sheet
    By kesavanprabhu in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-27-2013, 10:30 AM
  7. Kindly assist to consolidate data from raw data sheet to report sheet
    By ejima in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-30-2012, 10:11 AM

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