Closed Thread
Results 1 to 3 of 3

Please Help: Paste Column Contents to Next Available Column Without Data

Hybrid View

  1. #1
    mneches@gmail.com
    Guest

    Please Help: Paste Column Contents to Next Available Column Without Data

    I'm attempting to setup a macro where it copies all of the info from
    column F and pastes the contents (Values only) into the next available
    empty column to the right (same worksheet). Therefore, each time the
    data is pasted it's pulled from the same column (F) and is pasted a
    column further over to the right everytime. I would like to paste only
    the values of the originating cells as well, no formats or formulas.

    Any help would be very much appreciated.

    Regards,

    Michael


  2. #2
    Chip Pearson
    Guest

    Re: Please Help: Paste Column Contents to Next Available Column Without Data

    Michael,

    Try some code like the following

    Dim Rng As Range
    For Each Rng In Range("F1:F10") '<<< CHANGE RANGE
    Rng.EntireRow.Cells(1, Columns.Count). _
    End(xlToLeft)(1, 2).Value = Rng.Value
    Next Rng


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com



    <mneches@gmail.com> wrote in message
    news:1146257721.912819.233550@v46g2000cwv.googlegroups.com...
    > I'm attempting to setup a macro where it copies all of the info
    > from
    > column F and pastes the contents (Values only) into the next
    > available
    > empty column to the right (same worksheet). Therefore, each
    > time the
    > data is pasted it's pulled from the same column (F) and is
    > pasted a
    > column further over to the right everytime. I would like to
    > paste only
    > the values of the originating cells as well, no formats or
    > formulas.
    >
    > Any help would be very much appreciated.
    >
    > Regards,
    >
    > Michael
    >




  3. #3
    mneches@gmail.com
    Guest

    Re: Please Help: Paste Column Contents to Next Available Column Without Data

    Chip,

    Thank you so much for the code, this worked very well except I think I
    need one tweak to it. The string you supplied me with puts the data
    for each row into the next available column to the right, meaning if
    the first 10 rows had data in all 3 columns to the right, yet the
    second 10 rows had data only in the first column to the right, the data
    pastes into different columns with in the same running of the macro.
    Is there any way to get the macro to paste all of the column data into
    the same column, the first available column to the right? Please let
    me know if this does not make any sense and you need more info from me.

    Thank you again so much for the help with this, it is greatly
    appreciated.

    Regards,

    Michael


Closed 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