+ Reply to Thread
Results 1 to 4 of 4

Copy and Paste 42k times

  1. #1
    Registered User
    Join Date
    05-26-2016
    Location
    Los Angeles, CA
    MS-Off Ver
    97-2003
    Posts
    1

    Copy and Paste 42k times

    I have a spreadsheet with 42k rows of line items. If a line item (all info from row C to N) has a blank cell below it, I need to copy that information and paste it to the blank row (or rows) below that range. The blank come randomly. There could be 3 rows blank followed by 2 populated ones.

    The pasting will need to stop once there is data below. This will need to be duplicated down the spreadsheet.

    Can anyone help me write a VBA for this task? I am very new to VBAs.

    Thank you.

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Copy and Paste 42k times

    Welcome to the forum.

    If I understand your request properly I think you can avoid VBA. It seems like you are trying to find blank cells, then fill then with the value below which can be done with FIND SPECIAL (and I use this little trick ALL the time)!
    http://www.contextures.com/xlDataEntry02.html

    I would find all blanks, then hit = and UP button on the keyboard then CTRL+ENTER to fill ALL the blanks. THEN if you don't want the formulas anymore, you can copy and PasteValues on the entire selection.
    Last edited by mikeTRON; 05-26-2016 at 11:10 AM.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,414

    Re: Copy and Paste 42k times

    Hi Mike,

    yes, it's a bit of Excel magic, but I think you would hit = then UP before Ctrl-Enter, so that you get the data from the above cell.

    Pete

  4. #4
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Copy and Paste 42k times

    Quote Originally Posted by Pete_UK View Post
    Hi Mike,

    yes, it's a bit of Excel magic, but I think you would hit = then UP before Ctrl-Enter, so that you get the data from the above cell.

    Pete

    Oh yeah I suppose you are correct I will change my comment.

+ 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] Copy and Paste Image 120 times.
    By OthelloDog in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-14-2016, 01:57 PM
  2. [SOLVED] Copy/Paste a row x times
    By Choppo in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-14-2013, 10:20 AM
  3. [SOLVED] Copy and paste rows 3 times
    By Hyperdude in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2013, 02:59 AM
  4. copy and paste in one-go instead of performing 20 times copy & paste?
    By cyli2423 in forum PowerPoint Formatting & General
    Replies: 1
    Last Post: 08-24-2012, 06:06 AM
  5. [SOLVED] Copy and paste a range x many times
    By acsta14 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-20-2012, 07:15 AM
  6. Copy every n cell and paste n-times
    By Kanja13 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-09-2010, 05:00 AM
  7. Copy/Paste 30 Times or Loop?
    By GeorgY in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-18-2009, 12:33 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