Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to copy multiple cells into one cell | Excel Discussion (Misc queries) | |||
Copy multiple cells to one cell | Excel Discussion (Misc queries) | |||
macro copy/paste data from multiple cells to multiple cells | Excel Discussion (Misc queries) | |||
How to copy multiple cells between worksheets | Excel Discussion (Misc queries) | |||
List box, copy multiple Cells | Excel Worksheet Functions |