LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Inserting blank columns

Hi again

I am trying to insert a column into an excel sheet. Using VBA it read
like this:

'shift cells to right
Range("E:E,H:H,K:K,N:N,Q:Q,T:T,W:W,Z:Z,AC:AC,AF:AF ,AI:AI").Select
Selection.Insert Shift:=xlToRight

I am trying to do this in VB this way. I am not sure of the syntax

For i = 2 To 31 Step 4
Selection.Insert Shift:=xlToRight
Next

Any one with the equivalent in VB would be appreciated

--
Message posted from http://www.ExcelForum.com

 
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
Inserting blank rows plus using Sum Bill95051 New Users to Excel 3 April 8th 09 07:38 PM
Totalling columns & inserting blank row afterwards Alfadeke Excel Discussion (Misc queries) 0 January 29th 09 08:41 PM
inserting a blank row mrselkoil Excel Discussion (Misc queries) 1 January 24th 07 09:18 PM
Can parital cells be underlined w/o inserting blank columns? FinancialStmtProb2006 Excel Discussion (Misc queries) 2 May 28th 06 03:44 PM
Formula for inserting blank row Connie Martin Excel Worksheet Functions 6 November 18th 05 04:12 PM


All times are GMT +1. The time now is 12:02 AM.

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

About Us

"It's about Microsoft Excel"