ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to copy columns values (https://www.excelbanter.com/excel-programming/362673-macro-copy-columns-values.html)

Mike_can

Macro to copy columns values
 
Hi everyone, i need your help with this..
I have a spreadsheet with 80 columns, and i need to insert 2 blank columns
after each columns the spreadsheet would be like this:
A B C D E F G H I J K
1 5 7 9 11 50 70 30 25 15 17 5
2 1 3 7 10 82 54 36 2 8 19 31
3 2 8 60 90 45 85 74 15 55 87 84

And i would need id like this:

A B C D E F G H I J K L
M N O P
1 5 7 9 11
50 70
2 1 3 7 10
82 54
3 2 8 60 90
45 85


Thanks a lot



Tom Ogilvy

Macro to copy columns values
 
Sub AddTwoColumns()
Range("G:K").EntireColumn.Delete
for i = 6 to 3 step - 1
columns(i).Resize(,2).Insert
Next
End Sub

--
Regards,
Tom Ogilvy


"Mike_can" wrote in message
...
Hi everyone, i need your help with this..
I have a spreadsheet with 80 columns, and i need to insert 2 blank columns
after each columns the spreadsheet would be like this:
A B C D E F G H I J K
1 5 7 9 11 50 70 30 25 15 17 5
2 1 3 7 10 82 54 36 2 8 19 31
3 2 8 60 90 45 85 74 15 55 87 84

And i would need id like this:

A B C D E F G H I J K L
M N O P
1 5 7 9 11
50 70
2 1 3 7 10
82 54
3 2 8 60 90
45 85


Thanks a lot






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

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