+ Reply to Thread
Results 1 to 3 of 3

Macro to add data from one sheet to another (by searching sheet contents)

  1. #1
    Registered User
    Join Date
    09-06-2013
    Location
    Northamptonshire, England
    MS-Off Ver
    Excel 2003
    Posts
    45

    Macro to add data from one sheet to another (by searching sheet contents)

    Afternoon all,

    I am attempting to create a macro to search a particular sheet in a workbook and copy certain cells into other exiting sheets in the workbook.

    In the attached example document I am looking to copy Columns E and F and then search Column A to find the name of a corresponding sheet in the workbook once the relevant sheet has been found then the copied information should be pasted into the appropriate column within the named sheet.

    I have completed this process manually for the tab titled 'ASSET1!' as an example of the desired end result.

    Ideally i would like the macro to cycle through all entries in the 'Join_Data' sheet and paste the relevant information into each corresponding sheet.
    *The number of entries for each 'ASSET' is just an example, the data positions will vary each time the macro is used*

    Additionally it could be possible to join the information by using the contents of Column B? This data acts as a sort of Primary Key...just a thought?

    I would appreciate any assistance that is available.
    Looking forward to hearing back from someone.

    Than you in advance.

    Regards
    Ethanrholt
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    09-26-2014
    Location
    Moscow, Russia
    MS-Off Ver
    MSE 10, MSE 13
    Posts
    179

    Re: Macro to add data from one sheet to another (by searching sheet contents)

    Hello, Ethanrholt.

    Try this code. I've placed button to "Asset9" sheet just for changes to be obvious.

    This code have 1 big restriction - all of your data must be prepared as you have it in your Example. I mean, all of used in Join_Data sheet names must exist. And what is more, all of this sheets must contain descriptions which I used as keys.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Best wishes and have a nice day!

  3. #3
    Registered User
    Join Date
    09-06-2013
    Location
    Northamptonshire, England
    MS-Off Ver
    Excel 2003
    Posts
    45

    Re: Macro to add data from one sheet to another (by searching sheet contents)

    Thank you Rioran,

    That seemed to work perfectly. I placed your code into my actual workbook and had to make a couple of tweaks to finalise it.
    I appreciate your input! Thank you very much.

    Regards
    Ethanrholt

+ 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. Macro to build new sheet in workbook based upon contents of a different sheet in same book
    By IrishMist1748 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-09-2014, 06:44 PM
  2. [SOLVED] Macro for searching on sheet 1 with data from sheet 2 and create new sheets
    By stitchoz in forum Excel Programming / VBA / Macros
    Replies: 30
    Last Post: 03-03-2014, 12:25 PM
  3. macro error while searching data in multiple sheet
    By sanyaa in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-22-2013, 12:34 PM
  4. [SOLVED] Simple macro to create list of sheet names and the contents of cells A1 & N1 of each sheet
    By atcsmh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-15-2013, 11:11 AM
  5. Replies: 1
    Last Post: 03-24-2009, 04:35 AM

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