+ Reply to Thread
Results 1 to 9 of 9

Macro to copy data from various locations repeating down a list

  1. #1
    Registered User
    Join Date
    04-19-2022
    Location
    Bristol, England
    MS-Off Ver
    Professional Plus 2021
    Posts
    21

    Macro to copy data from various locations repeating down a list

    Morning all,

    I need to produce a list from an imported PDF file in Excel. The list has multiple accounts on it showing what they have bought in a store. This results in some people having one line and some with 20 etc. I need all of this data in a clean list with all the relevant data added to the end columns. I have attached an image showing the template and what I need.

    I need B10 copied to col U against each row of data (where there are transactions only), I need the blank cells under the dates populated with the date from above (only where there's a transaction) and the name and form as well (as per the colour coding). I could record a macro to do this for the first entry but I don't know how to repeat it down the entire sheet (8000 rows) which have different number of rows in each set of data.

    Can anyone help please?
    Thanks
    James
    Attached Files Attached Files

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Macro to copy data from various locations repeating down a list

    Using that *exact* format, this appears to do the trick:

    Please Login or Register  to view this content.
    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Registered User
    Join Date
    04-19-2022
    Location
    Bristol, England
    MS-Off Ver
    Professional Plus 2021
    Posts
    21

    Re: Macro to copy data from various locations repeating down a list

    Hi WBD,

    That's perfect! Thank you. I ran it on my full workbook and it worked perfectly. Much appreciated

    James

  4. #4
    Registered User
    Join Date
    04-19-2022
    Location
    Bristol, England
    MS-Off Ver
    Professional Plus 2021
    Posts
    21

    Re: Macro to copy data from various locations repeating down a list

    WBD

    You helped me out on this macro back in April and it's worked since then but it's suddenly stopped working. I tried using it on the original file and it doesn't do what it used to do... it's doing most of the macro but it's not bringing all of the data together and putting all of the rubbish rows/columns at the end. As the macro and original spreadsheet haven't changed im not sure if something in excel has changed? Any ideas?

    Thanks James

  5. #5
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Macro to copy data from various locations repeating down a list

    Can you post a spreadsheet where the macro no longer works?

    WBD

  6. #6
    Registered User
    Join Date
    04-19-2022
    Location
    Bristol, England
    MS-Off Ver
    Professional Plus 2021
    Posts
    21

    Re: Macro to copy data from various locations repeating down a list

    Here is a test data sheet. Thanks Test data.xlsm

  7. #7
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Macro to copy data from various locations repeating down a list

    OK. I ran the macro on the sheet you provided and I'm struggling to see what's wrong with the output? See attached.

    WBD
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    04-19-2022
    Location
    Bristol, England
    MS-Off Ver
    Professional Plus 2021
    Posts
    21

    Re: Macro to copy data from various locations repeating down a list

    Test data v2.xlsm

    I have attached a new sheet. 1 tab is the one you sent and the other is how it used to look... i.e. sorted so the data is together and the rest is at the bottom.

  9. #9
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Macro to copy data from various locations repeating down a list

    Nope. It never did that; not sure how you got that impression. Regardless, try this macro instead on a copy of the data. It should clean up the table and remove everything else.

    Please Login or Register  to view this content.
    WBD

+ 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. [SOLVED] Run through list with file locations copy data back to main workbook
    By jatki19 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-21-2020, 03:21 AM
  2. [SOLVED] Macro to copy and paste output to locations based on a list of cells
    By dunder in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-17-2018, 08:14 AM
  3. Shortest Path between Locations (without repeating)
    By ciaran3 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-05-2017, 10:43 AM
  4. Replies: 1
    Last Post: 12-09-2015, 06:20 PM
  5. Macro repeating from filter list needed
    By kiko0014 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-16-2011, 01:43 AM
  6. color and count repeating empty cell locations
    By henneman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2010, 05:53 AM
  7. How can I average data from a repeating list into a unique list?
    By Hicoda in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-03-2006, 02:50 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