Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy values separated by a set number of columns Pablo Excel Discussion (Misc queries) 2 February 16th 09 07:36 PM
Copy values separated by a set number of columns Pablo Excel Discussion (Misc queries) 1 February 13th 09 10:57 PM
Copy values in columns to rows Carpe Diem Excel Worksheet Functions 0 December 20th 06 09:01 PM
Copy columns values into separate columns Mike_can Excel Discussion (Misc queries) 7 May 27th 06 12:32 AM
Macro simplifying - copy rows to worksheets based on values in 2 different columns markx Excel Programming 1 February 27th 06 03:36 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"