ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Copy / pasting columns (https://www.excelbanter.com/excel-discussion-misc-queries/115295-copy-pasting-columns.html)

Manoj

Copy / pasting columns
 
I have 2 spreadsheets with data. NOw i want to copy alternate columns from
the first sheet (A, C, E, G and so on) and paste in the second in the
alternate columns (A, C, E, G and so on). The data in column B, D, F, H and
so on should not be disturbed in the second sheet.

Is this possible at one go. Not individual copy / pasting of columns.
There are many such sheets where data has to be copied / pasted.

Thanks in advance


Dave Peterson

Copy / pasting columns
 
Maybe you could record a macro when you copy|paste each column.

Then when you need to do it again, you can just rerun this macro.

Manoj wrote:

I have 2 spreadsheets with data. NOw i want to copy alternate columns from
the first sheet (A, C, E, G and so on) and paste in the second in the
alternate columns (A, C, E, G and so on). The data in column B, D, F, H and
so on should not be disturbed in the second sheet.

Is this possible at one go. Not individual copy / pasting of columns.
There are many such sheets where data has to be copied / pasted.

Thanks in advance


--

Dave Peterson

Lori

Copy / pasting columns
 
To select alternate columns try the following:

1. Insert a line in row 1
2. Type 1 in B1
3. Select A1:B1 and drag right to the end of the data (so each
alternate column has a value)
4. With this selection press Ctrl+\ followed by Ctrl+0 to hide
alternate columns
5. Delete row 1
6. Select all columns of data and press Alt+;

Now when you copy the selection only the alternating columns will be
pasted.
To restore the original layout, select all cells and press Ctrl+Shift+0
(format column unhide)


Dave Peterson

Copy / pasting columns
 
That pasted the visible cells, but it didn't paste into every other column.

Lori wrote:

To select alternate columns try the following:

1. Insert a line in row 1
2. Type 1 in B1
3. Select A1:B1 and drag right to the end of the data (so each
alternate column has a value)
4. With this selection press Ctrl+\ followed by Ctrl+0 to hide
alternate columns
5. Delete row 1
6. Select all columns of data and press Alt+;

Now when you copy the selection only the alternating columns will be
pasted.
To restore the original layout, select all cells and press Ctrl+Shift+0
(format column unhide)


--

Dave Peterson

Lori

Copy / pasting columns
 
I missed that you had to paste to alternate columns. In that case you
could work on a copy of the data and follow the same steps with the
adjustment below to select only even columns:

4. Edit . Goto Special blanks followed by Ctrl+0

With columns B,D,F,... selected press delete to remove the data.
Then copy all data cells and paste to new sheet with the option to skip
blank cells

It assumes all cells in the data are populated, so you might have to do
an initial replace on blanks. This is all recordable but convoluted and
a custom macro is probably a better option...



Dave Peterson wrote:

That pasted the visible cells, but it didn't paste into every other column.

Lori wrote:

To select alternate columns try the following:

1. Insert a line in row 1
2. Type 1 in B1
3. Select A1:B1 and drag right to the end of the data (so each
alternate column has a value)
4. With this selection press Ctrl+\ followed by Ctrl+0 to hide
alternate columns
5. Delete row 1
6. Select all columns of data and press Alt+;

Now when you copy the selection only the alternating columns will be
pasted.
To restore the original layout, select all cells and press Ctrl+Shift+0
(format column unhide)


--

Dave Peterson




All times are GMT +1. The time now is 11:14 AM.

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