PDA

View Full Version : find and move data macro



montrof
12-21-2006, 01:07 PM
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

lucas
12-21-2006, 01:45 PM
Hi montrof,
Would you just be searching one column in the data sheet?

montrof
12-21-2006, 01:58 PM
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

montrof
12-21-2006, 02:38 PM
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

lucas
12-21-2006, 06:11 PM
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.

montrof
12-22-2006, 05:43 AM
Thank you so much that is a great starting point.

Have a great Holidays,
Montrof

montrof
12-22-2006, 06:22 AM
One quick question, How do I change the code so that the results are started at cell A7 on the sheet search.

Montrof