+ Reply to Thread
Results 1 to 26 of 26

Combineing specific rows from multiple sheets to one sheet

  1. #1
    Registered User
    Join Date
    06-11-2007
    Location
    Co Cork, Ireland
    MS-Off Ver
    2007, 2010
    Posts
    33

    Combineing specific rows from multiple sheets to one sheet

    I have about 25 sheets in an excel file, all have the same layout with different info. The info is to do with stock in a shop. And each sheet is separate to an area of the shop, ie laptop, tv, washing machine etc. So one supplier can have products in more than one area. All sku codes are 7 digits long and the first 3 digits identify the supplier. The last 4 then are product specific.

    What I want to do is have a drop down with the supplier's name, then this populates another cell with their 3 digit identity code (I have that part done).

    This is where I can't work out what to do. I then need the info referring to that supplier pulled from every sheet and put into the sheet where the drop down box is. There are only 4 columns that are needed. These are A, B, C and D. Ideally I'd like them to move over 1, ie A to B, B to C, C to D and D to E. Then I'd like the name of the source sheet to go into A.

    I can provide the file if necessary.

  2. #2
    Forum Contributor visha_1984's Avatar
    Join Date
    11-27-2012
    Location
    Pune,India
    MS-Off Ver
    Excel 2010
    Posts
    290

    Re: Combineing specific rows from multiple sheets to one sheet

    Hi,Muttly

    provide sample file..
    Happy to Help

    VISHA

    Click *, if the suggestion helps you!
    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>> "Mark your thread as Solved"

  3. #3
    Registered User
    Join Date
    06-11-2007
    Location
    Co Cork, Ireland
    MS-Off Ver
    2007, 2010
    Posts
    33

    Re: Combineing specific rows from multiple sheets to one sheet

    Here you go.

    Product Listing.xlsx

  4. #4
    Forum Contributor visha_1984's Avatar
    Join Date
    11-27-2012
    Location
    Pune,India
    MS-Off Ver
    Excel 2010
    Posts
    290

    Re: Combineing specific rows from multiple sheets to one sheet

    pls Try

    Please Login or Register  to view this content.

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

    Re: Combineing specific rows from multiple sheets to one sheet

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    06-11-2007
    Location
    Co Cork, Ireland
    MS-Off Ver
    2007, 2010
    Posts
    33

    Re: Combineing specific rows from multiple sheets to one sheet

    @AB33, that copies all the info from all sheets. It is a start though. Thanks. I just need to separate out the rows I need.

  7. #7
    Registered User
    Join Date
    06-11-2007
    Location
    Co Cork, Ireland
    MS-Off Ver
    2007, 2010
    Posts
    33

    Re: Combineing specific rows from multiple sheets to one sheet

    @Visha, that just asks for an object???

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

    Re: Combineing specific rows from multiple sheets to one sheet

    Muttly,
    Tell me exactly what rows and columns you wish to copy and I will adjust the code. I thought you want to copy 4 columns only.

  9. #9
    Registered User
    Join Date
    06-11-2007
    Location
    Co Cork, Ireland
    MS-Off Ver
    2007, 2010
    Posts
    33

    Re: Combineing specific rows from multiple sheets to one sheet

    Thanks. Basically at the top of the sheet you have a drop down list (I think in the original file is says A1 "129" and the B1 "Indesit" in "COUNT"). If you look at the product codes some start with 129. Therefore anything starting with 129xxxx should be copied in.

    It doesn't have to populate the sheet when opened, Only when the drop down changes selection.

    If you hit the drop down (B1) and change to "Samsung", "048" comes in to A1 and that should clear the sheet and pull 048xxxx from all sheets.

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

    Re: Combineing specific rows from multiple sheets to one sheet

    Muttly,
    This is not a simple consolidation. I did not even see you have a sheet called "Data". I am sure you are referring the sheet name to these numbers. I have changed the B1, got the number in A1, but how does this number related to sheet name?
    I have to go the sheet "Data" to relate this number so as to relate to sheet name. You also want auto consolidation if you change the value in B1. Right?

  11. #11
    Registered User
    Join Date
    06-11-2007
    Location
    Co Cork, Ireland
    MS-Off Ver
    2007, 2010
    Posts
    33

    Re: Combineing specific rows from multiple sheets to one sheet

    The sheet name is not referenced by the number. The number is the first 3 digits of the product code. The first 3 numbers of any product code refer to the supplier hence selecting Samsung returns 048. The ideal solution would then be all product codes that start 048 would populate the sheet.

    BTW Data is an irrelevant name, it could be sausages for all that matter. The only place "Data" is referenced is the vlookup to return the 3 digit reference with regard to the Supplier name.

    I hope that helps.

  12. #12
    Registered User
    Join Date
    06-11-2007
    Location
    Co Cork, Ireland
    MS-Off Ver
    2007, 2010
    Posts
    33

    Re: Combineing specific rows from multiple sheets to one sheet

    If you want I can put in an example of the result I want?

  13. #13
    Registered User
    Join Date
    06-11-2007
    Location
    Co Cork, Ireland
    MS-Off Ver
    2007, 2010
    Posts
    33

    Re: Combineing specific rows from multiple sheets to one sheet

    Attached required result.

    Product Listing.xlsx

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

    Re: Combineing specific rows from multiple sheets to one sheet

    Muttly,
    I am getting close understanding your request, but the auto issue is the sticking point. SAMSUNG which is in column A, is found in all sheets and found in sheet COUNT A1 as well. So you just want to consolidate all SAMSUNG's in to count sheet, but it is not going to auto. I mean by this: if you change the drop down to let's say 129, the code will not auto fill in the count sheet with that module, but if you have specific-fixed names you wish to consolidate, I will have a go, i.e let's all all SAMSUNG, or other products. Please let me know

  15. #15
    Registered User
    Join Date
    06-11-2007
    Location
    Co Cork, Ireland
    MS-Off Ver
    2007, 2010
    Posts
    33

    Re: Combineing specific rows from multiple sheets to one sheet

    I can live without the auto but the search must be based on the number in column D rather than the name in column A. Reason being not all products that are SAMSUNG come from 048. Some come from 003.

    A great example is 129xxxx, it can be either Indesit or Hotpoint however for our purposes they come from the same supplier. Supplier is always priority over Manufacture.

    Thanks again.

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

    Re: Combineing specific rows from multiple sheets to one sheet

    Muttly,
    You mean column C, column D are prices while column C is a code. I am not sure which column is the supplier. You have model, Brand and code. Let say,you have three codes numbers for SAMSUNG in sheet DVD AND BLURAY PLAYERS 0482005,0482017,0482019. How do I know which number is for SAMSUNG? I suspect, any number which starts with 48 is SAMSUNG. Right? Assuming it is, you just want to consoldiate all 48 from each sheet only. 48 is the ID, or supplier name.

  17. #17
    Registered User
    Join Date
    06-11-2007
    Location
    Co Cork, Ireland
    MS-Off Ver
    2007, 2010
    Posts
    33

    Re: Combineing specific rows from multiple sheets to one sheet

    Ya, column C, sorry.

    Our codes are 7 digits in length, eg 0482005. These are 2 part codes 048, 2005. 048 tells me Samsung. 2005 identifies the product.

    The supplier is always the first 3 digits and the product id is always the last 4.

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

    Re: Combineing specific rows from multiple sheets to one sheet

    Okay! I have lost tracking this thread now. You want to consolidate all supplier with 048 from all sheets. Is this is the only supplier? Please clarifay. I know you want to copy 4 columns A-D only. Is there anything I am missing@

  19. #19
    Registered User
    Join Date
    06-11-2007
    Location
    Co Cork, Ireland
    MS-Off Ver
    2007, 2010
    Posts
    33

    Re: Combineing specific rows from multiple sheets to one sheet

    If you could do that for me I can modify the code after for each other supplier. Column A-D should become Column B-E. Then Column A should have the source sheet's name.

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

    Re: Combineing specific rows from multiple sheets to one sheet

    Try this one. I have also tried to use find function, but slower than looping through the cells

    Please Login or Register  to view this content.

  21. #21
    Registered User
    Join Date
    06-11-2007
    Location
    Co Cork, Ireland
    MS-Off Ver
    2007, 2010
    Posts
    33

    Re: Combineing specific rows from multiple sheets to one sheet

    Right I've it sorted using a combination of code from here and google. Huge thanks to AB33 for the majority of the code, specifically that part I couldn't work out. This code now is fully automatic. If I select anything from the drop down list it updates cell B1 which in turn then calls the consolidation function. Inside that it clears the sheet excluding the headings, adds back in the relevant data, then adds borders and sizes the columns correctly.
    Please Login or Register  to view this content.

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

    Re: Combineing specific rows from multiple sheets to one sheet

    Muttly,
    Welld done!
    Just curious to know where does the event sheet is residing? Is on the sheet count?

  23. #23
    Registered User
    Join Date
    06-11-2007
    Location
    Co Cork, Ireland
    MS-Off Ver
    2007, 2010
    Posts
    33

    Re: Combineing specific rows from multiple sheets to one sheet

    Here you go. I've attached the full sheet.
    From my understanding I would assume its in the current sheet (I could be wrong though, lol).

    Just a little warning it is a macro enable sheet.

    Product Listing-x.xlsm

    Martin.

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

    Re: Combineing specific rows from multiple sheets to one sheet

    Martin,
    Thanks for sending the attached!
    Unfortunately, when I tried to download it, my PC warns me: the file has a virus and would not let me download it.

  25. #25
    Registered User
    Join Date
    06-11-2007
    Location
    Co Cork, Ireland
    MS-Off Ver
    2007, 2010
    Posts
    33

    Re: Combineing specific rows from multiple sheets to one sheet

    Thoughts as much. If you turn off your auto protect for 5 minutes you can download it then. But if not I've attached a non macro enabled worksheet so you can see the sheet then you can add in the macro from the code above on the "COUNT" sheet and try it out yourself. Product Listing-xy.xlsx

    I've also attached it in a zip format so you could try downloading the macro version in a zip file. Your scanner will probably still pick it up though. plx.zip

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

    Re: Combineing specific rows from multiple sheets to one sheet

    Martin,
    I have now got it from the zip. All fine and thanks!

+ 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