Hi all,
Hope you can help me out.. I am hoping I can get some assistance with creating a macro to ask a user to select a work book to import and then it will only had the 1st 2 work sheets from the selected workbook.
Then it will ask the user what name it wants to find.... then user inputs the name and the macro searches the 2 newly imported worksheets in column A and B, and if it 'contains' the name then will copy it to a results worksheet (and copy row 2 as a static line from each of the work book to differentiate which sheet it came from)
1. Import button:
Action: Pop ups box "please select the workbook you would like to import"
....the Macro then Imports document\workbook > adds only worksheet 1 and worksheet 2 from the selected workbook (the workbook that is selected could be anywhere on the users C:\*)
2. Pop up box2:
"Enter in the name you want to search for"
2a. ie: 'Sarah' is entered by the user. The macro finds anything in column 'A' & B on both worksheets that were imported in Step 1 that Contains 'Sarah'.
2b. The macro should then add the results to a new worksheet titled "Results" in the workbook.
Note1: if Sarah is found in for example column A row 17 and column B row 17 then only 1 instance of this should be copied to the results page.
Note2: When the results are copied from worksheet 1 (work sheet 1 is actually the macro page, so when I say worksheet 1 I am referring to the 1st work sheet that was imported) row 2 should be copied also as this is the column headers. The same applies for worksheet 2 as the column headers can be different to worksheet 1's.
I hope I havent you!
Thanks in advance guys!!!
Bookmarks