+ Reply to Thread
Results 1 to 11 of 11

Input box to search and results in a new worksheet

  1. #1
    Registered User
    Join Date
    11-14-2014
    Location
    Derbyshire, England
    MS-Off Ver
    2010
    Posts
    49

    Input box to search and results in a new worksheet

    Good Morning,

    Please Login or Register  to view this content.
    With the above code (it has an error) but it was a bit of research and a bit of guess work to try and achieve the following:
    Search cells C:E for a value, if it occurs in any cell to then create a new worksheet named of the value. For example
    Surname Forename Option 1 Option 2 Option 3
    Smith John 1 6 25
    Bond James 25 29 9
    Hunt Ethan 6 17 12

    If I was to type "25" in the inputbox I would need it to copy row 2 & 3 and name the worksheet "25"

    Hope this helps

    Thanks

    Ashley

  2. #2
    Forum Contributor
    Join Date
    09-05-2012
    Location
    Dubai
    MS-Off Ver
    Office 365
    Posts
    409

    Re: Input box to search and results in a new worksheet

    Try this....
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-14-2014
    Location
    Derbyshire, England
    MS-Off Ver
    2010
    Posts
    49

    Re: Input box to search and results in a new worksheet

    Hi Naveenmarapaka,

    Thank you very much for your help!! however it seems to have a few issues. As you can see from the current sample data as shown attached with the code Test1.xlsm, I tested it with 25 and it only copied one record over.

    I have tried looking for a solution myself, however no luck so far, so was wondering if you could help me further

    Thanks

  4. #4
    Forum Contributor
    Join Date
    09-05-2012
    Location
    Dubai
    MS-Off Ver
    Office 365
    Posts
    409

    Re: Input box to search and results in a new worksheet

    You put wrong in your code ,... also don't put code in worksheet...

    always make a module .. and put code..


    in the last line you mentioned
    ws.Rows(i).Copy Destination:=Sheets(Findstr).Range("A" & y ) in your code in attached sample

    where it was y+1 in my code ,,, just use my code and test again.....
    Last edited by naveenmarapaka; 12-01-2014 at 11:05 AM.

  5. #5
    Registered User
    Join Date
    11-14-2014
    Location
    Derbyshire, England
    MS-Off Ver
    2010
    Posts
    49

    Re: Input box to search and results in a new worksheet

    Hi Naveen,

    Thanks for the promptly response, however the issue still stands even with your code and it in the "Module"

    Thanks

    Ashley

  6. #6
    Forum Contributor
    Join Date
    09-05-2012
    Location
    Dubai
    MS-Off Ver
    Office 365
    Posts
    409

    Re: Input box to search and results in a new worksheet

    Its working fine... Have a look at the attached.....
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-14-2014
    Location
    Derbyshire, England
    MS-Off Ver
    2010
    Posts
    49

    Re: Input box to search and results in a new worksheet

    Hi Naveen,

    Is there away to overwrite if there is already existing data in one of the tabs, rather than "adding" on to it? to save the duplicates

    Thanks for all your help! +rep'd

  8. #8
    Forum Contributor
    Join Date
    09-05-2012
    Location
    Dubai
    MS-Off Ver
    Office 365
    Posts
    409

    Re: Input box to search and results in a new worksheet

    Try this....
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    11-14-2014
    Location
    Derbyshire, England
    MS-Off Ver
    2010
    Posts
    49

    Re: Input box to search and results in a new worksheet

    Thanks alot!

  10. #10
    Forum Contributor
    Join Date
    09-05-2012
    Location
    Dubai
    MS-Off Ver
    Office 365
    Posts
    409

    Re: Input box to search and results in a new worksheet

    Glad it helped you...


    1. Click on the star if you think someone helped you

  11. #11
    Registered User
    Join Date
    11-14-2014
    Location
    Derbyshire, England
    MS-Off Ver
    2010
    Posts
    49

    Re: Input box to search and results in a new worksheet

    Already have done

+ 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. Replies: 6
    Last Post: 08-22-2014, 08:47 AM
  2. [SOLVED] Create List of results from a input search, select desired result, paste into worksheet
    By EddieRubi in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-25-2014, 02:59 AM
  3. Search Worksheet Using ComboBox & Show Results in Different Worksheet
    By MIFF3436 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-21-2012, 11:42 AM
  4. [SOLVED] Macro to search through dates and display results based on user input
    By Alan668 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-22-2012, 12:40 PM
  5. Combining two macros ( user input & search/copy results)
    By newbe2009 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-12-2009, 10:19 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