+ Reply to Thread
Results 1 to 3 of 3

VBA Search and Copy

  1. #1
    Registered User
    Join Date
    02-22-2009
    Location
    Alabama, USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    VBA Search and Copy

    I have two datetimepickers and two combo boxes in userform Find. I want to be able to search sheet1 by any or all the datetimepickers and combo boxes. If there is a match in either of the fields, then I would like the row (in sheet 1) the contains the match to be copied and put on the next available row in sheet2. I will need for all matches to be put on sheet2. I have the following code in place, but I am stuck as to where to go now. It will look for matches on sheet 1 from one of the combo boxes and will copy and paste that one cell match into sheet2.

    Please Login or Register  to view this content.
    Any help to fix the code to what I need it to be, will be much appreciated.

    Thanks
    Jessica
    Last edited by VBA Noob; 02-23-2009 at 05:03 AM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: VBA Search and Copy

    Hello Jessica,

    Welcome to the Forum!

    It looks to me that you are searching only column "C" on "Sheet1". How will the user select which DateTime Picker and/or CombBox to include in the search or are looking for ideas?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    02-22-2009
    Location
    Alabama, USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: VBA Search and Copy

    I was thinking I would create the same type of code for each combo box and datetimepicker. Like an and/else kind of thing. I haven't gotten that far yet, as I don't know how to get it to copy the whole row.

+ 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