Consulting

Results 1 to 7 of 7

Thread: find and move data macro

  1. #1
    VBAX Regular
    Joined
    Jul 2004
    Posts
    14
    Location

    find and move data macro

    I need help with what i would assume is a simple macro. I want to have a sheet called Search and in cell A1 there would be a a string and then in another sheet called data I want search and and any rows containing that value or a part of that value would be copied to the Search sheet.

    Thanks,
    Montrof

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Hi montrof,
    Would you just be searching one column in the data sheet?
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    VBAX Regular
    Joined
    Jul 2004
    Posts
    14
    Location
    I would like to search columns A Through D. I for example if I was searching for the the word "test' any row that had a string contianing test would be be copied and moved. So even if a cell had the word "test.Blank" it would be selected.

    Thanks,

    Montrof

  4. #4
    VBAX Regular
    Joined
    Jul 2004
    Posts
    14
    Location
    I was thinking I could make a select box to let them pick which column to search in so that way it would only have to search one coulmn at a time. This may make it easier.

    Thanks.
    Montrof

  5. #5
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    montrof,
    This will work although it's not perfect. Click on Showform to get started. I only did 2 columns for you......(you need to help me some). Plus this will get you started learning. I used buttons on a userform because it was easy and quick. You can use radio buttons, etc.

    Look in the vbe at the regular and userform modules to figure out what is going on. The button on the search page calls the showform macro in module 1. double click on the buttons in the vbe to see which macro's they call

    ps maybe someone will clean up behind me.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  6. #6
    VBAX Regular
    Joined
    Jul 2004
    Posts
    14
    Location
    Thank you so much that is a great starting point.

    Have a great Holidays,
    Montrof

  7. #7
    VBAX Regular
    Joined
    Jul 2004
    Posts
    14
    Location
    One quick question, How do I change the code so that the results are started at cell A7 on the sheet search.

    Montrof

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •