+ Reply to Thread
Results 1 to 7 of 7

Finding and copying multiple criteria using macro

  1. #1
    Registered User
    Join Date
    03-13-2011
    Location
    GE
    MS-Off Ver
    Excel 2007
    Posts
    6

    Question Finding and copying multiple criteria using macro

    Hello friends. I’m new member of this forum and I hope that you could help me.
    Before describing my issue, I want to admit that I’m not very good at VBA and writing macros, so I do hope that criticism from more experienced member will be avoided. I have done search through internet and could not find macro that would be appropriate for my case.

    I’m working with huge file, like 50k-90k records in each sheet, and sometimes sheet number goes up to 10 or even more. My job is to find if these record contain names of certain products: Product1, Product2,…….etc. The min. amount of search terms as a rule is 10 (from Product1 to Product10), but sometimes it goes up to 70.

    I’m interesting if it is possible to write a macro that will help me to define if cells in all sheets contains product names(only), if contains copy this name in new workbook. The name of products remain unchanged, but there is a problem with cell value, as sometimes they contain product name in following order: Product1(010170), or like # 22847 Product2, or # Product3 87622. There have been cases where I found these name in texts: There has been 1% decline in sales of Produc1 etc.

    Please help me resolve this problem.

    Thank you very much

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,485

    Re: Finding and copying multiple criteria using macro

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

  3. #3
    Registered User
    Join Date
    03-13-2011
    Location
    GE
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Finding and copying multiple criteria using macro

    Quote Originally Posted by davesexcel View Post
    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!
    Tanks and

    Hope this file will help you to understand general idea of my issue,
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-13-2011
    Location
    GE
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Finding and copying multiple criteria using macro

    No one knows how to resolve this issue?

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Finding and copying multiple criteria using macro

    Kotler,

    I am looking into creating a solution for this. I'll be able to get something to you on Monday (3/28). Hopefully you are still looking for something.

    I have to warn you though, searching through that much data can cause stack problems, and it can take a very long time for a search to complete.

  6. #6
    Registered User
    Join Date
    03-13-2011
    Location
    GE
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Finding and copying multiple criteria using macro

    Wow thanks friend. Actually I know that, search will take some time, but I'm sure that it want take much longer then manual search using ctrl+f.

    I'll be looking forward for your reply.

  7. #7
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Finding and copying multiple criteria using macro

    Kotler,

    I have attached a modified version of your dummy sheet that contains a working macro to perform the search and put the results into a new workbook. Let me know if you have questions.

    ~tigeravatar
    Attached Files Attached Files

+ 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