+ Reply to Thread
Results 1 to 6 of 6

Copy Data from Column and Paste to Next Blank Column on 2nd Sheet

Hybrid View

  1. #1
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Copy Data from Column and Paste to Next Blank Column on 2nd Sheet

    You could try this

    Option Explicit
    
    Sub CopyColumnBandPasteToFirstFreeColumnSheet2()
        Dim LastRow  As Long, PasteToCol As Long
        
        LastRow = Sheet1.Range("B" & Rows.Count).End(xlUp).Row
        Sheet2.Cells.Columns.Hidden = False
        PasteToCol = Sheet2.Cells(1, Columns.Count).End(xlToLeft).Column + 1
        Sheet1.Range("B1:B" & LastRow).Copy Sheet2.Cells(1, PasteToCol)
        Sheet2.Cells(1, PasteToCol) = Sheet2.Cells(1, PasteToCol) & Space(1) & PasteToCol - 1
        Sheet1.Range("B2:B" & LastRow).Clear
        With Sheet2
            .Range(.Cells(1, 2), .Cells(1, PasteToCol)).EntireColumn.Hidden = True
        End With
    End Sub

    This will
    1/. Copy Sheet1.Columns("B") to Next free column in Sheet2
    2/. Number the Column Header Answer 1, 2, 3, etc
    3/. Hide all columns with answers
    4/. Finally clear the answers from Sheet1

    Hope this is of some help.

  2. #2
    Registered User
    Join Date
    01-28-2010
    Location
    montreal, canada
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Copy Data from Column and Paste to Next Blank Column on 2nd Sheet

    Thanks for the help. I ended up going with teh first solution seemed simpler. Though I'd still like to add 1 mor eline that clears the responses on Sheet 1 range b1:b20

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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