+ Reply to Thread
Results 1 to 10 of 10

Consolidation of Data from Multiple Sheets

  1. #1
    Registered User
    Join Date
    10-11-2016
    Location
    Cambridge
    MS-Off Ver
    2007
    Posts
    7

    Question Consolidation of Data from Multiple Sheets

    Hi

    I am new to the forum so firstly hello and secondly apologies if this is a common request!

    I have some code which I have tried to butcher to perform a consolidation, but it doesn't seem to be collecting all data (or deleting some mid process).

    I'm fairly new to VBA and although tend to be able to bodge things cant see where this ones going wrong.

    What i'm trying to achieve is:

    I have multiple sheets in a workbook which are labelled as per days of the month (1st, 2nd, 3rd, 4th, 5th...up to 31st).

    Within each sheet are two tables which are fixed in terms of the rows they take up. I am trying to consolidate the data from Rows 39-86.

    In column F of each of these are specific text ("TO DO", "RESOLVED", etc).

    I would like to take each row which contains (for example) "TO DO" and put these rows into a summary sheet (called "ACCRUALS"). If possible it would be even better if i could use the search box to input the text searched for as per the example code below.

    Current Code:

    The current code i am using is below, this seems to be working, but deleting some values for some reason:

    Please Login or Register  to view this content.
    Any help would be much appreciated. Many thanks.
    Last edited by JBeaucaire; 10-11-2016 at 12:10 PM. Reason: Added missing CODE tags. Please read and follow the Forum Rules, link above in the menu bar. Thanks.

  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: Consolidation of Data from Multiple Sheets

    Doesn't sound overly complex. Can lease provide a sample workbook I could test my suggestions on?

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    _________________
    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
    10-11-2016
    Location
    Cambridge
    MS-Off Ver
    2007
    Posts
    7

    Re: Consolidation of Data from Multiple Sheets

    Hi

    Thanks, hopefully the sample file attached is ok. I have cut it down to just 5 days but will obviously be for up to 31 in the full version.

    In the sample I am trying to have it so on the last SEARCH tab you can run the code, input the customer you are looking for (Customer 1 etc) and it will then copy out all rows across the sheets which match this.

    If you need any more detail ill try explain, thanks again.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Consolidation of Data from Multiple Sheets

    Your code copies in to next empty row in column A. This works fine so long as next cell in column A is NOT Empty.

    Use this line
    Please Login or Register  to view this content.
    Mind you about part match: xlPart
    It can return a funny result. You should use xlwhole

  5. #5
    Registered User
    Join Date
    10-11-2016
    Location
    Cambridge
    MS-Off Ver
    2007
    Posts
    7

    Re: Consolidation of Data from Multiple Sheets

    Hi

    Brilliant thanks.

    As a bonus for me, is there a way to just search rows 39-86 in each sheet, as opposed to the whole thing? As this one currently searches all rows I believe?

    Thanks again for your help.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Consolidation of Data from Multiple Sheets

    Repalce

    With Sheet.Columns(6)

    with

    With Sheet.Columns("F39:F86")

  7. #7
    Registered User
    Join Date
    10-11-2016
    Location
    Cambridge
    MS-Off Ver
    2007
    Posts
    7

    Re: Consolidation of Data from Multiple Sheets

    Hi

    I just switched this out and now get an error '1004' Application-defined or object-defined error.

    ?

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Consolidation of Data from Multiple Sheets

    It was my mistake, should be

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    10-11-2016
    Location
    Cambridge
    MS-Off Ver
    2007
    Posts
    7

    Re: Consolidation of Data from Multiple Sheets

    Absolutely perfect

    Thank you so much for your help!

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

    Re: Consolidation of Data from Multiple Sheets

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. consolidation from multiple sheets
    By leprince2007 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-08-2016, 11:40 AM
  2. [SOLVED] Consolidation several tabs' data into a consolidation sheet via a loop?
    By Gti182 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-30-2015, 08:18 AM
  3. Data Consolidation with option of switching sheets off and on
    By surbuttan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-13-2014, 06:13 PM
  4. Automatic consolidation of data from multiple sheets
    By ScottBeatty in forum Excel General
    Replies: 2
    Last Post: 07-23-2014, 11:31 AM
  5. Replies: 9
    Last Post: 05-03-2012, 10:29 AM
  6. multiple data consolidation and pivots
    By prasjohn in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-22-2010, 05:27 AM
  7. Data consolidation from Multiple Sheets
    By wingale in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-14-2006, 12:30 PM

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