ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Copying Rows (https://www.excelbanter.com/new-users-excel/50333-copying-rows.html)

Dthmtlgod

Copying Rows
 
As an example.

I have a spreadsheet, columns A, B, C, D, E, F, G, H, I, J (with no column
names).
I need to copy three cells from each row into another spreadsheet.

I need to copy the value from column H, G, and A in that order.

What is the easiest way to do this?




[email protected]

Are You looking to use a Macro to do this, and where on the new sheet
do you wish to start copying your data. I assume you want to copy the
three cells from H,G & A and paste them side by side on the new sheet
but I am not sure so I cant help till I know. Also need to know if the
other sheet is in the same workbook, Gimme some feedback... Mark


[email protected]

Dthmtlgod:
I couldnt sleep last night and your question got me thinking so I
put together a Macro for you that will do the trick. Trouble is it is
too lengthy to copy here in a format that will be easily legible. If
you want me to send it to you, E-mail me @ and I'll
snap it to you as an attatchment.


Jai

Copying Rows
 
Hi,
I would create an array (if the datatypes are all the same - of the
required datatype or else of type variant). I would copy data from a row into
the array members and then use that to copy into the destination sheet. In
case multiple rows are involved, could create an arry of arrays 9 two
dimensionsal).

In case the number of rows is very large, it may be worth copying the
entire sheet to a new sheet, deleting the unwanted columns and then copying
and pasting the rows to get them in the right order.

Jai

" wrote:

Dthmtlgod:
I couldnt sleep last night and your question got me thinking so I
put together a Macro for you that will do the trick. Trouble is it is
too lengthy to copy here in a format that will be easily legible. If
you want me to send it to you, E-mail me @ and I'll
snap it to you as an attatchment.




All times are GMT +1. The time now is 12:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com