ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   insert a blank column between each column in a data file (https://www.excelbanter.com/excel-discussion-misc-queries/164261-insert-blank-column-between-each-column-data-file.html)

Holly

insert a blank column between each column in a data file
 
I have a file with 60 columns, I need to insert a blank column between each
of these 60 columns, is there a macro or command I could use?

Thanks.

FSt1

insert a blank column between each column in a data file
 
hi
manual = select every other column and hit ctrl++
or you can paste this in a standard module
Sub addcol()
Dim c As Range
Dim cc As Range
Set c = Cells(1, 2)
For i = 1 To 60
Set cc = c.Offset(0, 1)
c.EntireColumn.Insert
Set c = cc
Next i
End Sub

regards
FSt1

"Holly" wrote:

I have a file with 60 columns, I need to insert a blank column between each
of these 60 columns, is there a macro or command I could use?

Thanks.



All times are GMT +1. The time now is 07:43 PM.

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