Hello,
I am running out of time and my head is spinning, so I hoped I would try this Forum for help.
My VBA skills are pretty bad and this job is to complicated and to big to either use build-in macros, formulas or simply ctr+v
What I need to achieve is:
-Find names from a list in a table and move all rows that contain the searched name into a new workbook, which is saved with a particular name found in another list
-the searched name can be found in one or several columns, but never twice in the same row
-the main table is on sheet1 and the lists on sheet 2
My problems:
- creating a loop to repeat the same procedure for each name and filename in the Name list (
Surname1, Firstname1 / OutputExtract_Surname1, Firstname1.xlsx)
- ensuring only the filtered results are copied into the new workbook
- the code needs variables and range declared properly
- an iferror code needs adding too, but its not important right now, and who knows, I might be able to create it myself
- if the code looks a bit messy, it is because I tried to make things a bit clearer
Many thanks guys!
Here is the code from the example data:
'
'if an Error occours (ie, name not found, filenaming error), record error in wsAllNames in column "ErrorLog", in the same row as the search name is located and moves on to next step
'opens msgbox at end of routine, before closing workbook, with message "errors recorded", if errors have been recorded, no msgbox if no error occured
Bookmarks