ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Column re-arrange in a worksheet (Macro help) (https://www.excelbanter.com/excel-programming/410412-column-re-arrange-worksheet-macro-help.html)

Sinner

Column re-arrange in a worksheet (Macro help)
 
Hi,

I have some data in sheet3.
In sheet4, I want to do the following:

Example:
- columnA of sheet3 values in columnH sheet4
- columnB of sheet3 values in columnK sheet4
and so on. I have almost 21 columns to re-arrange to get the report
that I want.

I have done that with simple = cell in sheet4 for sheet3 but since
data range in sheet3 varies so I have to update sheet4 cells.

Also the calculation time slow.

Some code in back ground can be useful.

Any help is appreciate.

Don Guillett

Column re-arrange in a worksheet (Macro help)
 

For the whole col
sub copywholecols()
with sheets("sheet4")
.columns("h").value=sheets("sheet3").columns("a"). value
.columns("k").value=sheets("sheet3").columns("b"). value
end with
end sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Sinner" wrote in message
...
Hi,

I have some data in sheet3.
In sheet4, I want to do the following:

Example:
- columnA of sheet3 values in columnH sheet4
- columnB of sheet3 values in columnK sheet4
and so on. I have almost 21 columns to re-arrange to get the report
that I want.

I have done that with simple = cell in sheet4 for sheet3 but since
data range in sheet3 varies so I have to update sheet4 cells.

Also the calculation time slow.

Some code in back ground can be useful.

Any help is appreciate.




All times are GMT +1. The time now is 04:26 AM.

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