+ Reply to Thread
Results 1 to 14 of 14

Search for text and list in separate tabs based on result

  1. #1
    Registered User
    Join Date
    08-16-2009
    Location
    glasgow
    MS-Off Ver
    Excel 2010
    Posts
    29

    Search for text and list in separate tabs based on result

    I'm looking to sort a pile of data based on what names appear in a comments cell, into separate tabs sorted by the name contained. There is also a separate tab for items with no name included.

    So all of the listings containing Andy appear in Andy's tab, all of Billy's appear in his tab and so on. Listings with no name go into a separate tab.

    Hope this picture explains it. I attempted to upload a sample, but it wasn't working.

    Capture.JPG

    Thanks

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: Search for text and list in separate tabs based on result

    Pictures are often very hard to work with.

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

    Anyway, you would need a macro for this...

    Something like this would work, but using column H to store the persons name. If there is no name, put "No Name" in column H to match the tab name.

    Please Login or Register  to view this content.
    I'm moving this thread to the VBA section.
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    08-16-2009
    Location
    glasgow
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Search for text and list in separate tabs based on result

    Sample.xlsx

    complete:
    Sample.xlsx
    Attached Images Attached Images

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,636

    Re: Search for text and list in separate tabs based on result

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-16-2009
    Location
    glasgow
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Search for text and list in separate tabs based on result

    that's perfect, thanks!

    How would I go about scaling it up to include surnames, and add more names?

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,636

    Re: Search for text and list in separate tabs based on result

    It's up to you.
    The code is looking at the sheet names for the the criteria of Autofilter, so if you add more worksheets with the names that you want to retrieve, it will do the job.

    And if you change worksheet names to full name, it also filter with the full name.

  7. #7
    Registered User
    Join Date
    08-16-2009
    Location
    glasgow
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Search for text and list in separate tabs based on result

    And if I have a longer list of data, will it work?

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,636

    Re: Search for text and list in separate tabs based on result

    It should.

    Jut try it for yourself and if you find any problem post back.

  9. #9
    Registered User
    Join Date
    08-16-2009
    Location
    glasgow
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Search for text and list in separate tabs based on result

    I've changed to full names and got the error:

    Ambiguous name detected: test

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,636

    Re: Search for text and list in separate tabs based on result

    That means you have multiple procedure named "test" within a same module.

    Delete one of them or rename it to something else like "test2"...

  11. #11
    Registered User
    Join Date
    08-16-2009
    Location
    glasgow
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Search for text and list in separate tabs based on result

    Thanks for all your help with this.

    I've tried pasting in the real data, and I'm finding that not all of the data is being filtered into the pages.

    out of 245 entries, only 153 of them are appearing in any of the sheets.

    Is there anything that would cause certain cells to be ignored

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,636

    Re: Search for text and list in separate tabs based on result

    Do you mean the rows that should be allocated to certain worksheet appears to "No name" sheet?

    If so, the sheet name and the name in the comment are not matching.
    Check the sheet name like extra space, otherwise I need to see your workbook.

  13. #13
    Registered User
    Join Date
    08-16-2009
    Location
    glasgow
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Search for text and list in separate tabs based on result

    It's missing data.

    I pasted the data in two separate blocks. It seems like the first block is working, but the second block isn't.

    Some data with names hasn't been filtered into the relevant sheets, some with no names haven't been filtered either.

    It isn't isolated to specific names, as one name which should have 9 entries only has 5.

    All 9 appear in the data tab, 5 appear in that person's tab, and none of the remaining 4 entries appear in either that person's tab or the no name tab.

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,636

    Re: Search for text and list in separate tabs based on result

    Quote Originally Posted by anglarna_ger View Post
    I pasted the data in two separate blocks. It seems like the first block is working, but the second block isn't.
    I don't understand this meaning.

    How do you exactly have data layouts?

+ 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. [SOLVED] Place text in a specific cell based on two separate drop down list entries
    By fazthfc in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-24-2015, 03:34 PM
  2. Search text with wildcards in a table and return result as list in other sheet
    By nedned in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-03-2015, 03:08 PM
  3. [SOLVED] Split a list in to separate tabs
    By kiboodez in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-02-2014, 11:31 AM
  4. Moving multiple excel tabs into separate tabs/separate files
    By RO24 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-02-2014, 11:04 AM
  5. VBA Code - Search text & search number & search qty and result - Urgent Please
    By naresh73 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-15-2014, 10:51 AM
  6. [SOLVED] Search text in cells, find matching text based on list, remove all but one entry
    By adam_mc in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-30-2013, 12:50 PM
  7. Replies: 1
    Last Post: 04-11-2005, 01:06 AM

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