+ Reply to Thread
Results 1 to 6 of 6

Macro for Filtering

  1. #1
    Registered User
    Join Date
    03-26-2008
    Posts
    10

    Macro for Filtering

    Hi,

    I have some data like this..........

    S.No-ID-Name of the Product-Name of the person-Amount
    1-456-ERC-jon-6564
    2-645-FGD-gibbs-2231
    3-458-GDF-jon-4534
    4-456-ERC-jon-556
    5-562-HUY-sam-215
    6-645-FGD-gibbs-2231
    7-458-GDF-jon-4534
    8-456-ERC-jon-556
    9-562-HUY-sam-215
    10-458-SED-jon-556
    11-254-ASW-sam-215
    12-457-QWE-gibbs-2231
    13-456-ERC-jon-4534
    8-456-ERC--jon-556
    9-562-HUY-sam-215

    I have to import the data into excel through "-" delimited text to column.

    Now i have to create a seperate work book for each Person in which i need to get the rows according to the ID speartely in a new sheet.
    (like all the 456 code rows of that person in a new sheet in his work book and so on)

    Can you create a macro where it first filters the name in the list(it should not take the name as criteria since the names would not be same every time)
    Then filter each code and copy them to a new sheet for that person workbook and the next code of the list into the next sheet in the same work book and so on.

    Practically I got some 60k every month and i need to do this.....

    A macro would help me a lot.



    Thanks,
    Sam.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You can do this, but is it absolutely necessary to duplicate all that data. It's more manageable in one sheet.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    If you want a macro to do this, see the code that I posted here

    http://www.excelforum.com/showthread...advancedfilter

  4. #4
    Registered User
    Join Date
    03-26-2008
    Posts
    10
    Quote Originally Posted by royUK
    If you want a macro to do this, see the code that I posted here

    http://www.excelforum.com/showthread...advancedfilter
    hi,

    I need all the duplicates as well cause i will have a column for date as well
    it gives the date of the transaction

  5. #5
    Registered User
    Join Date
    03-26-2008
    Posts
    10
    Quote Originally Posted by royUK
    If you want a macro to do this, see the code that I posted here

    http://www.excelforum.com/showthread...advancedfilter

    Hi royUK,

    The code you gave me was excellent.

    It give the result in perfect way for the file you have given.
    but it gives error as "subscript out of range" when i run it on my file.
    Mat be it is because of the name of the sheet, can you please make the change to be the active sheet.

    and also I need the filter set to be on column E.


    Please help me out.


    Thank you Sooooooooo Much.

    Sam.
    Last edited by gloring; 03-27-2008 at 06:23 AM.

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    The example will obviously need modifying for your use. To filter on Column E change

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    If you ant to use the ActiveSheet then simply change this

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.

+ 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