Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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



wrote in message
oups.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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paste changing cell contents to consecutive cells in a column meggy Excel Worksheet Functions 3 September 4th 07 09:21 PM
Fill a column with the contents of another column based on a choic Sparky56 Excel Discussion (Misc queries) 1 March 31st 07 04:18 AM
how to copy contents of one column to another column in another worksheet yefei Excel Discussion (Misc queries) 3 February 25th 06 05:57 PM
move contents of column C based on criteria related to column A Debra Excel Discussion (Misc queries) 2 December 27th 05 10:25 PM
Copy contents in a row and paste in a column CJMFH Setting up and Configuration of Excel 1 July 15th 05 03:14 PM


All times are GMT +1. The time now is 06:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"