+ Reply to Thread
Results 1 to 1 of 1

Macro: Copy/Paste values From Column to Next Blank Row

  1. #1
    Registered User
    Join Date
    07-11-2013
    Location
    Hawaii
    MS-Off Ver
    Excel 2010
    Posts
    1

    Question Macro: Copy/Paste values From Column to Next Blank Row

    Hello, I need a little help here figuring out how to copy and paste values from 3 columns to the next available blank row.

    I'm using the macro below right now to fill in Column A. But instead of doing one column at a time, I'd like to be able to have this same code work for columns A through C.

    So in column A, it would copy the first value it sees and pastes it until it finds another value in the same column. Same for B and C, all working simultaneously.

    Also if possible, I'd like it to have a message box to ask me what cell to start with. The code below starts in A9, but the data I need to copy doesn't always start in A9, sometimes it could be A3. I typically change this manually depending on the spreadsheet I'm using.

    Thanks in advance for your help!
    Liz

    Sub FillRowA()
    Dim Name As String
    For Each C In Range("A9:A" & Cells(Rows.count, 1).End(xlUp).Row)
    If Cells(C.Row, 1) > "" Then
    Name = Cells(C.Row, 1).Value
    Cells(C.Row, 1).Copy
    Else
    Cells(C.Row, 1).Value = Name
    Cells(C.Row, 1).pastespecial (xlPasteFormats)
    End If
    Next
    End Sub


    Note: Example in the attachment. Starting with column A: A3 would be copied and pasted on A4:A7, then A8 would be copied and pasted in A9:A298
    Attached Files Attached Files

+ 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] Need VBA Macro to Copy and paste column data in blank rows and repeat through spreadsheet
    By slk1186 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-07-2014, 12:50 PM
  2. [SOLVED] Macro to copy columns and paste into one column in next blank column
    By rmmohan in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-31-2013, 03:14 PM
  3. Need macro button to copy and paste special values into next available blank row
    By AngelaG in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-26-2011, 07:55 AM
  4. Macro that will copy values in Column J and paste values to Column B in new sheet
    By Phixtit in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-16-2010, 04:56 PM
  5. Insert blank column and copy/paste values
    By eonizuka in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-22-2009, 01: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