+ Reply to Thread
Results 1 to 17 of 17

Separate data into different sheet and link

  1. #1
    Registered User
    Join Date
    09-09-2011
    Location
    kuching, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    52

    Separate data into different sheet and link

    Dear all expert,

    I had a master file contains all the data. I want it to be separated into different sheet base on the 12NC no. automatically.

    Attached here with the excel file. In master sheet i have all the data. Is there a way that excel can automatically help me to separate those data into different sheet base on different 12NC no? In attached file i have show the result how i want it to be separated "sheet 2-4"

    After that, i will assign a drop down list box at master sheet to allow me to select the 12NC. Once the 12NC selected, it will bring me to the 12NC sheet that i selected. Example in column "I5"

    Can this be done with formula? or Macro is needed?
    Attached Files Attached Files

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Separate data into different sheet and link

    Hi nickh1981,

    Please see attached file. The data is separated by formulas are on sheet1, sheet2 and sheet3
    Attached Files Attached Files
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Registered User
    Join Date
    09-09-2011
    Location
    kuching, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Separate data into different sheet and link

    Hi AlKey,

    Thanks for the formula. My original file contains 90 different 12NC, is that means that i have to create 90 sheet one by one and insert the formula. Is there a better way of doing this?

  4. #4
    Registered User
    Join Date
    09-09-2011
    Location
    kuching, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Separate data into different sheet and link

    If i need to manual key in all the formula sheet by sheet i might just filter the master file then copy & paste to the sheet will be easier.

    Is there any other way to do it, perhaps with macro?

  5. #5
    Registered User
    Join Date
    09-09-2011
    Location
    kuching, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Separate data into different sheet and link

    Anyone can help on this?

  6. #6
    Registered User
    Join Date
    09-09-2011
    Location
    kuching, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Separate data into different sheet and link

    No one can help?

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Separate data into different sheet and link

    You never mentioned in your requirements that the data would have to be split in 90 Sheets! I think maybe someone could offer a VBA solution.

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,829

    Re: Separate data into different sheet and link

    There is no real need to have 90 different sheets - why not have one sheet, on which you can select the number that you are interested in, and have the data automatically appear for that number?

    That is what the attached file does with just three simple formulae.

    I've created a new sheet called Query, and used cell J1 (yellow) to enable you to select the 12NC number from the list in column N. This is very similar to what you had in the Master sheet, and if you have more than 3 numbers to choose from then you can just add them to the bottom of column N and adjust the range for the data validation in cell J1.

    I've inserted a new column A in the Master sheet and put this formula in A2:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This is copied down beyond your data (I've just copied to row 50 - the hyphens indicate how far), and it sets up a unique sequential number for each record that matches the 12NC# selected in J1 of the Query sheet. If you are satisfied that this formula has been copied down far enough to accommodate extra data in future, you can hide this column so that your sheet looks exactly the same as before. I've used the same layout on the Query sheet, with this formula in A2:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This finds the row in the Master sheet where the first matching record occurs. When the formula is copied down it finds the row of the second matching record, then the third, and so on. Again, hyphens indicate how far down the formula has been copied - I've just copied it to row 20, but you should ensure that it has been copied down far enough to accommodate the maximum amount of data you are likely to need for any given 12NC number.

    Then I have this formula in B2:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    which just gets the data from column B on the Master sheet on the row given in column A. This formula is copied across to H2, and appropriate formatting applied to each cell, and then the block of formulae in A2:H2 can be copied down to row 20.

    Now, to use the file just change the number in cell J1 and the data will automatically change. It takes a lot longer to describe than to use.

    Hope this helps.

    Pete

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

    Also, since you are relatively new to the forum, I would like to inform you that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete
    Attached Files Attached Files

  9. #9
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Separate data into different sheet and link

    Try this...

    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  10. #10
    Registered User
    Join Date
    09-09-2011
    Location
    kuching, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Separate data into different sheet and link

    Hi Pete,
    Thanks for the suggestion. The reason i want to separate it into different sheet is to allow me to update the data easier. The data will be update daily, so instead of update everything in the master list, i just need to update on the 12NC sheet that i want. Anyway, your formula is good for displaying all data separately in one sheet.

    Hi Six,
    I apply your vb code to the file, but it has a run time error 5. Can you help me to find out where i have done wrong? Attached here with the file.
    Attached Files Attached Files

  11. #11
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Separate data into different sheet and link

    I downloaded your file and the macro is working fine… Can you please click debug and take a screen shot on which line it is showing error?

  12. #12
    Forum Contributor
    Join Date
    11-21-2013
    Location
    zimbabwe
    MS-Off Ver
    Excel 2003
    Posts
    124

    Re: Separate data into different sheet and link

    Plz find my file attached
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    09-09-2011
    Location
    kuching, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Separate data into different sheet and link

    macro error.jpg

    Hi Six,

    Attached with the error print screen.

  14. #14
    Registered User
    Join Date
    09-09-2011
    Location
    kuching, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Separate data into different sheet and link

    Great work soledad!!! Thanks.

  15. #15
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Separate data into different sheet and link

    @ nickh1981,

    Thanks for the screenshot file.

    Try the below code...

    Please Login or Register  to view this content.

  16. #16
    Registered User
    Join Date
    09-09-2011
    Location
    kuching, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Separate data into different sheet and link

    Hi Six,

    Works great. Thanks for the sharing.

  17. #17
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Separate data into different sheet and link

    Glad it helps you and thanks for the feedback

+ 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. Replies: 0
    Last Post: 11-06-2013, 02:59 PM
  2. Replies: 1
    Last Post: 07-03-2013, 08:44 PM
  3. Using VLOOKUP to link data on separate sheets
    By Meli in forum Excel General
    Replies: 5
    Last Post: 11-09-2012, 01:01 PM
  4. Replies: 1
    Last Post: 09-22-2012, 02:31 AM
  5. [SOLVED] How can I create a link between cells in two separate Excel sheet
    By Dawnmarie in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-18-2006, 01:40 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