+ Reply to Thread
Results 1 to 3 of 3

VB copy paste column data to another left to right sheet across sh

Hybrid View

  1. #1
    baz
    Guest

    VB copy paste column data to another left to right sheet across sh

    Hi I want to copy and paste a column of data using visual basic onto another
    data sheet in the same workbook. So that comums run accross the paste sheet
    left to right.
    I have done this copy and past one column but the next pastes over the last
    on the second sheet.

  2. #2
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243
    Hi Baz,

    Can you please provide a little more detail/clarity on what you want to do?
    eg please include the problematic code...

    If the columns you are copying are not side by side (eg columns A,C & E, rather than columns A,B & C) but you want them to be pasted side by side in the new sheet try adapting the following:

    Sheets("Sheet2").Range("A:c, f:f").Copy Sheets("Sheet3").Range("a1")

    However, if you want them to be pasted in the same relative locations that they currently exist in the original sheet, have a look at John W's "Copy multiple selections" at:
    http://www.j-walk.com/ss/excel/tips/tip36.htm

    hth
    Rob Brockett
    NZ
    Always learning & the best way to learn is to experience...

  3. #3
    cucchiaino
    Guest

    Re: VB copy paste column data to another left to right sheet across sh

    baz wrote:

    > Hi I want to copy and paste a column of data using visual basic onto another
    > data sheet in the same workbook. So that comums run accross the paste sheet
    > left to right.
    > I have done this copy and past one column but the next pastes over the last
    > on the second sheet.


    Hi, baz.

    Try

    Sub bazcopy()

    With ActiveSheet
    Worksheets(.Index + 1).Columns("A:A").Value = _
    .Columns("A:A").Value
    End With

    End Sub


    ()---cucchiaino
    www.riolab.org

+ 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