+ Reply to Thread
Results 1 to 26 of 26

Combine multiple sheet data into one main sheet

  1. #1
    Registered User
    Join Date
    10-07-2020
    Location
    new jersey
    MS-Off Ver
    2019
    Posts
    55

    Combine multiple sheet data into one main sheet

    Hi,

    I came across a requirement where I need to combine multiple sheets having reports into one main sheet. the data need to be combined in such a manner that each report data field must come under one another.

    Attached is the data file for reference.

    SO template tab is the summary where I want the reports to be combined.
    Sample reports are attached, Reports are the same for all tabs.

    In reports unique field is quote number.


    Kind regards,
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Combine multiple sheet data into one main sheet

    Hi
    It's not really clear which part you want to automate.
    Your report output tabs are empty except Report_Output1

  3. #3
    Registered User
    Join Date
    10-07-2020
    Location
    new jersey
    MS-Off Ver
    2019
    Posts
    55

    Re: Combine multiple sheet data into one main sheet

    All those headings in SO template tab should populate automatically when reports are inserted in file. There are 30-40 reports which are combined by me as shown in SO template tab. Each report have data that needs to be pasted. Report 1 is pasted in SO template tab as example. Rest of tabs are empty now but they will have similar data to report 1 arranged in similar manner.

  4. #4
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Combine multiple sheet data into one main sheet

    which headings? I don't see correlation between 'SO template' and 'Report_Output1'

  5. #5
    Registered User
    Join Date
    10-07-2020
    Location
    new jersey
    MS-Off Ver
    2019
    Posts
    55

    Re: Combine multiple sheet data into one main sheet

    Hi,

    Data that is filled in SO template tab is from Report_Output 1 tab. This data should come automatically from all the reports attached stacked one after another in SO template. All these fields that are entered in SO template are highlighted in Report_Output 1 and is available there.

    Thanks

  6. #6
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Combine multiple sheet data into one main sheet

    Is the grey part coming from Report_Output1?
    Or do you mean line 5 and down?

  7. #7
    Registered User
    Join Date
    10-07-2020
    Location
    new jersey
    MS-Off Ver
    2019
    Posts
    55

    Re: Combine multiple sheet data into one main sheet

    Yes from line 5 and down

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Combine multiple sheet data into one main sheet

    Please put sample data in "SO template": where does data in column H onwards come from?

  9. #9
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Combine multiple sheet data into one main sheet

    Quote Originally Posted by haroonkhurshid View Post
    Yes from line 5 and down
    OK! that was not obvious
    Now, do you combine manually all Report_Outputs into 1 tab? (in your example, 'Report_Output1') ?

  10. #10
    Registered User
    Join Date
    10-07-2020
    Location
    new jersey
    MS-Off Ver
    2019
    Posts
    55

    Re: Combine multiple sheet data into one main sheet

    Sir,
    I Copy data from report_output 1 and paste manually. Then I copy data from Report_Output 2 and paste in SO template and so on for all reports

    I also highlighted with different colors the data on a report that is coming on to the SO template.

    Thanks,
    Attached Files Attached Files
    Last edited by haroonkhurshid; 04-03-2021 at 10:01 AM.

  11. #11
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Combine multiple sheet data into one main sheet

    Seems more like a complete make question to me. With a macro.

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    10-07-2020
    Location
    new jersey
    MS-Off Ver
    2019
    Posts
    55

    Re: Combine multiple sheet data into one main sheet

    Code work fine thanks Vraag.

    One thing that is required if C06 is available then take C06 otherwise C00

    Column AO copies the values from Cell 33A and 54A.

    However, most of the time I have only one of those, and in that case, we should copy from cell 3A.

    So, Logic should be like If A33 and A54 etc is not available take A3, Otherwise use values from A33 and A54

    Thanks,
    Last edited by haroonkhurshid; 04-06-2021 at 08:11 PM.

  13. #13
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Combine multiple sheet data into one main sheet

    I believe the change required is shown in RED

    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    10-07-2020
    Location
    new jersey
    MS-Off Ver
    2019
    Posts
    55

    Re: Combine multiple sheet data into one main sheet

    Thanks John for quick resonse

    This code works if the Quote is not present all together in the report then it will give value from A3. It does not work if one quote is there and the other is missing:

    For example,
    In report
    Cell A33 is empty
    Cell A54 has quote

    it will give C06 instead of C00

  15. #15
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Combine multiple sheet data into one main sheet

    The code is written based on the sample file. If you now come up with all kinds of exceptions, you will have to post a better sample file. Or try to understand for yourself what the code does and adjust it yourself.
    Messages have been translated from Dutch to English by means of google translate.

  16. #16
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Combine multiple sheet data into one main sheet

    C06 is A33 and A54 if either are present so you appear to want C00 whether C06 (A33/A54 is present).

    If A33 is blank result is C00, if present C06

    If A54 is present , result is C06, if absent C00

  17. #17
    Registered User
    Join Date
    10-07-2020
    Location
    new jersey
    MS-Off Ver
    2019
    Posts
    55

    Re: Combine multiple sheet data into one main sheet

    There could be several ASD parts list in the report for which separate Quote no. is available and sometimes quote no. is missing for one of the list.
    Logic should be like even if one quote no. is missing for any ASD part list take C00. if all are present take C06

  18. #18
    Registered User
    Join Date
    10-07-2020
    Location
    new jersey
    MS-Off Ver
    2019
    Posts
    55

    Re: Combine multiple sheet data into one main sheet

    Sorry, i forgot to mention this exception

  19. #19
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Combine multiple sheet data into one main sheet

    So there is need to check how many ASD parts lists there are, then check if everyone has a quote, and if any missing use C00.

    This requires some additional coding as the C00/C06 values are determined as the rows are processed sequentially.

    As suggested by Vraag, post a better sample file.

  20. #20
    Registered User
    Join Date
    10-07-2020
    Location
    new jersey
    MS-Off Ver
    2019
    Posts
    55

    Re: Combine multiple sheet data into one main sheet

    Here is the sample having all scenerios covered
    Attached Files Attached Files

  21. #21
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Combine multiple sheet data into one main sheet

    There can be no code in an .xlsx. It is not that much effort to put it back in, but it does not show that you do much yourself to solve the question.

  22. #22
    Registered User
    Join Date
    10-07-2020
    Location
    new jersey
    MS-Off Ver
    2019
    Posts
    55

    Re: Combine multiple sheet data into one main sheet

    I used the code suggested by you and forgot to save the file as .xlsm
    I tried so many things to get it working in the correct manner. I am a beginner to VBA. so please dont mind


    My apologies.

  23. #23
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Combine multiple sheet data into one main sheet

    I like these kinds of questions to give them a mindset. I think the addition of @JohnTopley in # 13 is enough to get it working. Otherwise you will have to create a loop that looks from the first cell to the last cell and then attach conditions to it.
    The conditions will undoubtedly change again and so you will have to do some research yourself about how the code works.

  24. #24
    Registered User
    Join Date
    10-07-2020
    Location
    new jersey
    MS-Off Ver
    2019
    Posts
    55

    Re: Combine multiple sheet data into one main sheet

    This time conditions will not change. I will mark thread as solved after getting solution to this. It is my humble request please help. I am new and learning VBA and looping and conditions are tricky to get right.

  25. #25
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Combine multiple sheet data into one main sheet

    Please Login or Register  to view this content.
    Added FUNCTION to check if "QUotes" are present for all "ASD Parts List"

    See "SO Template"
    Attached Files Attached Files

  26. #26
    Registered User
    Join Date
    10-07-2020
    Location
    new jersey
    MS-Off Ver
    2019
    Posts
    55

    Re: Combine multiple sheet data into one main sheet

    Thanks Vraag & John for providing the code and helping me. It works fine.

    I spent 6 hours on the code provided earlier to work but it didn't work as expected.

    I am learning the VBA. It's like magic in the world of Excel.

+ 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. Auto population of data in multiple sheet from main sheet
    By rwalia07 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-12-2017, 08:57 AM
  2. Populate data from one main sheet to multiple sheets
    By robi0342 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-23-2016, 10:16 PM
  3. Populate data from one main sheet to multiple sheets
    By robi0342 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-23-2016, 09:19 PM
  4. Replies: 0
    Last Post: 10-12-2015, 10:02 AM
  5. How to combine worksheets into one main sheet using formula
    By gr8rck in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-11-2015, 06:55 PM
  6. Linking multiple tabs to one main data sheet
    By PARTRIM in forum Excel General
    Replies: 2
    Last Post: 12-02-2010, 06:04 PM
  7. [SOLVED] How do I combine data from several sheets into one main sheet?
    By Caren F in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-19-2006, 01:45 PM

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