+ Reply to Thread
Results 1 to 5 of 5

Search, find, cut and paste macro

  1. #1
    Registered User
    Join Date
    10-28-2011
    Location
    Ontario
    MS-Off Ver
    Excel 2007
    Posts
    30

    Search, find, cut and paste macro

    Hello, I would appreciate it very much if anyone could help me with this problem. My problem is this: In column A I have a list of numbers ranging from 0000 to 9999, and in column B I have their corresponding frequencies. What I need is a macro that will ask the user for four numbers and then to search column A and then to extract those four numbers and any combination of those numbers plus their frequencies and to place them in Columns D and E. For example, the user inputs 1234, 1234 and all combinations such as 2134 , 4312 , 3214 etc and their frequencies are extracted from Columns A and B placed in Column D and E. I hope I have explained the problem clearly. Thank you to anyone who can help me with this.
    Last edited by Omega71; 11-05-2011 at 11:07 AM. Reason: Title needs to be changed

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Search, find, cut and paste macro

    Please attach a sample file, it will surely be helpful.

  3. #3
    Registered User
    Join Date
    10-28-2011
    Location
    Ontario
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Search, find, cut and paste macro

    Hello arlu1201, I have attached the file and it shows Columns A and B with the data. In Columns D and E I have placed the results that I would like the macro to display. If I can get the macro to just show me the results without cutting and pasting them, that would be okay too. I tried using the FIND function but not sure how to get it to find any combination of the four digits. I can only find the exact match but I need all possible combinations. Any help would be great. Thanks.
    Attached Files Attached Files

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Search, find, cut and paste macro

    Try this. Author of the code - YOSHIDA Hajime (Aug. 23, 2001).
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-28-2011
    Location
    Ontario
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Search, find, cut and paste macro

    Hey nilem, That is exactly what I was looking for. Thanks very much for your help. Take care.

+ 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