Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default copy multiple cells

I have data in ceveral cells, for instance A1, C3, E11......
how can I create a macro wich copy these cells and paste them in another
sheet in a row?
Every time the macro runs, the data must be on another row.
First time paste on row 1
Second time paste on row 2
and so on...

Thanks for your help

Ben


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default copy multiple cells

Ben,

Here is a code snippet that copies all of the selected cells on one sheet to
Sheet2.

Dim cRows As Long, i As Long
Dim cell As Range

cRows = Worksheets("Sheet2").Cells(Rows.Count, "A").End(xlUp).Row
i = 1
For Each cell In Selection
cell.Value = Worksheets("Sheet2").Cells(cRows, i).Value
i = i + 1
Next cell

--

HTH

Bob Phillips

"B. Wassen" wrote in message
...
I have data in ceveral cells, for instance A1, C3, E11......
how can I create a macro wich copy these cells and paste them in another
sheet in a row?
Every time the macro runs, the data must be on another row.
First time paste on row 1
Second time paste on row 2
and so on...

Thanks for your help

Ben




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
how to copy multiple cells into one cell gilda1121 Excel Discussion (Misc queries) 0 February 10th 11 08:09 AM
Copy multiple cells to one cell Tigerxxx Excel Discussion (Misc queries) 9 December 28th 07 01:55 AM
macro copy/paste data from multiple cells to multiple cells Diana Excel Discussion (Misc queries) 0 July 10th 06 09:24 PM
How to copy multiple cells between worksheets Dominic Excel Discussion (Misc queries) 3 February 1st 06 02:23 PM
List box, copy multiple Cells [email protected] Excel Worksheet Functions 1 September 8th 05 11:29 PM


All times are GMT +1. The time now is 10:30 AM.

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"