+ Reply to Thread
Results 1 to 7 of 7

Copy data to worksheets

  1. #1
    Registered User
    Join Date
    10-21-2020
    Location
    Praha
    MS-Off Ver
    Office 2019
    Posts
    10

    Copy data to worksheets

    Hello.
    There is a name list in the "Total" sheet, and the "Matches" column is important here.
    The "Data" sheet contains the data that I need to sort into individual sheets according to "Matches".

    The code should look like this (translated into human language 1)
    Get the first name from the "Total" sheet from column "A"
    When you find this name on the "Data" sheet in column "A", cut out all these lines with this name and paste them into the sheet with the same name.
    (Since the individual sheets and the list of names on the "Total" sheet are made up of the "Data" sheet, at least one line must always be copied).
    Do this for all names in the "Total" sheet.

    Can anyone please help?
    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Copy data to worksheets

    Let us know if this is what you need. You should Delete all the named sheets from your workbook. The code will create the correct sheet names.

    Please Login or Register  to view this content.
    Last edited by maniacb; 10-21-2020 at 09:40 AM. Reason: Corrections to response

  3. #3
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Copy data to worksheets

    I've made a correction to my response above.

  4. #4
    Registered User
    Join Date
    10-21-2020
    Location
    Praha
    MS-Off Ver
    Office 2019
    Posts
    10

    Re: Copy data to worksheets

    Thanks again.
    However, it throws an error in the format of the copied data and the code does not run through.
    It stops here:

    For Each x In ttl.Range([A7], Cells(Rows.Count, "A").End(xlUp))

    Attachment 700781


    in the reference to what the table looks like before calling the code:
    https://files.fm/u/7n6g53z7?share_email_id=db9572




    Can I ask you for a repair?
    Last edited by Raders; 10-22-2020 at 12:37 AM.

  5. #5
    Registered User
    Join Date
    10-21-2020
    Location
    Praha
    MS-Off Ver
    Office 2019
    Posts
    10

    Re: Copy data to worksheets

    so here is the final form

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Copy data to worksheets

    Here is the code again with the file this time. It looks like you ran the code before I made corrections to it above. I did not understand what is the point of post #5


    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-21-2020
    Location
    Praha
    MS-Off Ver
    Office 2019
    Posts
    10

    Re: Copy data to worksheets

    It works great, thank you

+ 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. Copy worksheets (names, data and format) from saved data file to open active workbook
    By cdtouchberry in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-03-2019, 07:51 PM
  2. Macro to copy data from 3 different worksheets with different columns and rows of data
    By Louise_Hughes in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-12-2014, 07:38 AM
  3. Saving copy of data and then running macro on all active worksheets in saved copy?
    By Science87 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-09-2014, 11:56 AM
  4. Copy/Paste Range of Data from Multiple Workbooks/Worksheets to Master Workbook/Worksheets
    By NumberCruncher311 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-19-2013, 08:21 PM
  5. Macro to copy row data into new worksheets and separate delimited data
    By asuguy83 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-25-2012, 08:11 PM
  6. Copy and paste data in different worksheets of workbookA to diff worksheets in workbookB
    By preciousmetal2004 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-24-2012, 05:50 PM
  7. How to copy data from several worksheets into one
    By Azra Akhter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-28-2005, 03:05 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