+ Reply to Thread
Results 1 to 2 of 2

Extract_Outputs_by_PName Macro into new workbook for each PName

  1. #1
    Registered User
    Join Date
    09-16-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    1

    Extract_Outputs_by_PName Macro into new workbook for each PName

    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:

    '
    Please Login or Register  to view this content.
    '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

  2. #2
    Forum Contributor
    Join Date
    05-02-2015
    Location
    calgary alberta
    MS-Off Ver
    2012
    Posts
    205

    Re: Extract_Outputs_by_PName Macro into new workbook for each PName

    i think you will have better luck posting a desensitized copy of your workbook so we can see how everything is layed out

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Can a Macro in a Workbook open and run a macro found in the other Workbook
    By Bobbbo in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-05-2016, 01:53 PM
  2. Personal Macro Workbook interference with other workbook macro(s)
    By Xanlithe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-10-2015, 09:41 AM
  3. Replies: 1
    Last Post: 10-10-2015, 01:00 AM
  4. [SOLVED] VBA to open new workbook and run macro from new workbook, which closes old workbook
    By Rerock in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-26-2014, 10:45 AM
  5. [SOLVED] Macro to find data in source workbook and copy paste to target workbook
    By D.Lovell in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 04-23-2014, 06:21 AM
  6. [SOLVED] Save the split the workbook file type as Excel Binary Workbook From Run Macro
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-25-2013, 05:09 AM
  7. Replies: 0
    Last Post: 07-27-2011, 09:48 PM

Tags for this Thread

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