+ Reply to Thread
Results 1 to 7 of 7

Sorting using Macro

  1. #1
    Registered User
    Join Date
    11-28-2007
    Posts
    45

    Sorting using Macro

    Hi all, I have a requirement to sort on each item, if that item text is present in a cell.Please see the attached file. 'Reference' sheet has names of fruits. Now if we go to 'Results' sheet, ' T 'column, it has many fruits names separated by semi-colon. If we filter using "contains", for fruit, say , apple, it will give four results. So, all these four results should be copied(entire row) to another worksheet(name= apple), including the title, as shown done manually in 'Apple' worksheet. Similarly it should happen for other fruits also. Can this be automated, perhaps by using a macro... ? I use 2003 version.

    Any help will be highly appreciated ...

    Thanks in advance !
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Sorting using Macro

    See attached file where I added this macro:
    Please Login or Register  to view this content.
    Regards,
    Antonio
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-28-2007
    Posts
    45

    Re: Sorting using Macro

    Thanks a ton Antonio !!!!!.. Just one more.. it is working for first 19 rows of reference list as per my attached sheet.. however, can you make this work for the all the rows in reference sheet ? It is not always restricted to 19 .... Thanks once again...

  4. #4
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Sorting using Macro

    The macro reads dynamically the number of rows in the Reference sheet, it's not fixed to 19 rows.
    However tell me if you need I change something.

    Regards,
    Antonio

  5. #5
    Registered User
    Join Date
    11-28-2007
    Posts
    45

    Re: Sorting using Macro

    Hi Antonio, when I try to add more rows(upto 60, which is my actual requirement) it is returning an error(Error 400 ). I have attached the modified file for your reference; Thanks once again !!!
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    11-28-2007
    Posts
    45

    Re: Sorting using Macro

    This got SOLVED.. thanks a lot to Antonio and all other...
    Last edited by prasjohn; 09-14-2011 at 09:30 AM. Reason: SOLVED

  7. #7
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Sorting using Macro

    I checked my code and I've seen there were 2 times the same fruit name.
    If you want I can modify the macro to skip double fruit name and avoid the error.

    Regards,
    Antonio

+ 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