+ Reply to Thread
Results 1 to 3 of 3

Macro to copy data from one sheet to another depending on name in first cell

  1. #1
    Registered User
    Join Date
    03-09-2010
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    59

    Macro to copy data from one sheet to another depending on name in first cell

    Hi All,

    I am having troubles getting a Macro to work with the sheet I have attached.

    Basically I need it to loop down the 'Data Analysis' sheet and for each Component in Column A (1-10), copy the line and then paste it for this month on the sheet 'UK' in the row marked as the same Component number.

    The attachment should make it clearer.

    I hope that makes sense.

    Thanks in advance!
    James
    Attached Files Attached Files
    Last edited by subtilty; 06-14-2013 at 07:22 AM.

  2. #2
    Registered User
    Join Date
    03-09-2010
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: Macro to copy data from one sheet to another depending on name in first cell

    Currently I have this to do the loop:

    Please Login or Register  to view this content.
    The part I don't get is, how can I copy the range here 'Range(ActiveCell, ActiveCell.Offset(0, 13)).Copy' but also do a search to find the correct component on the UK tab before pasting.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to copy data from one sheet to another depending on name in first cell

    James,
    You would not able to find components numbers on the UK sheet as you have merged cells. You have merged rows 2-26 in to one cell.
    You can match(Find) each component number of sheet data analysis in a single cell(One row) ONLY in column A of UK sheet, not 24 rows as you have now.
    I had spent over 3 hours this morning trying to find out why my code was not working (Not your thread).
    Reason: Each cell in each sheet was merged.
    I shall call today as one of those merged days.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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