+ Reply to Thread
Results 1 to 5 of 5

Loop that detects last row and pastes data below it

  1. #1
    Registered User
    Join Date
    11-21-2017
    Location
    NJ, USA
    MS-Off Ver
    2016
    Posts
    1

    Loop that detects last row and pastes data below it

    I am trying to write a macro that will loop through 300 sheets, and on each sheet will select and copy a set of data, paste it on a summary page, and continue looping through. I had this sort of working, but it would only paste the last value in the range of data, and now it isn't working at all. I'm sure this isn't that difficult for someone who knows what they're doing...
    Please Login or Register  to view this content.
    I'm new to coding so I realize that there are problems here, hoping someone can point me on the right direction.
    Last edited by rjuliano; 11-21-2017 at 04:23 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,469

    Re: Loop that detects last row and pastes data below it

    Seems ok. What's in column BB?

    Might be worth posting a sample workbook with some typical data (just a few sheets).
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: Loop that detects last row and pastes data below it

    Change
    Please Login or Register  to view this content.
    to this
    Please Login or Register  to view this content.
    and you should be good to go
    Regards,
    Stephen

    If you feel someone has helped you please thank them and click on the star on their post to add reputation.
    Please ensure that you use code tags where relevant, and mark solved threads as solved.
    Most of all please be respectful and understanding of others.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,469

    Re: Loop that detects last row and pastes data below it

    Dohhhhh ... good spot

  5. #5
    Registered User
    Join Date
    05-16-2016
    Location
    Tangier
    MS-Off Ver
    MS 2013
    Posts
    14

    Re: Loop that detects last row and pastes data below it

    Here's a humble code to help I'm so new to this too

    Please Login or Register  to view this content.
    what this does is it copies values starting from A1 and past them to B1 then moves to A2 if there's value then Past to B2 loops until a cell from the column A:A is empty.

    Pay attention to fact that I named the 1St sheet 1St

    Hope this helps

+ 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. Replies: 6
    Last Post: 11-18-2013, 11:28 PM
  2. Macro that detects and circles invalid data automatically (Data Validation)
    By dchubbock in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-02-2012, 09:07 AM
  3. Replies: 1
    Last Post: 10-03-2012, 07:06 PM
  4. [SOLVED] Automating a macro that copies and pastes data and pastes 2 rows under the previous one.
    By thebank in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-30-2012, 05:02 PM
  5. I have a script in where it copies a sheet's data, and pastes it, but over pastes...
    By Cyberpawz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-24-2012, 02:20 AM
  6. Macro Loop Broken. Detects Max but doesn't continue loop
    By herchenbach in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2011, 12:17 PM
  7. For loop that pastes data using calculated row # and advances +1 column each time.
    By rclark430 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-01-2011, 06:50 PM
  8. [SOLVED] Loop that Copys from one sheet and pastes to another
    By JI in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-28-2006, 01:40 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