Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to Increment columns

I want to start at column 20 and incrment by 1 and insert
a heading for each column - all via a macro.

I can capture the column index but I can't seem to
increment to the next column.

Help

Glen

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to Increment columns

cells(1,20).Value = Array("Header1", "Header2", _
"Header3", "Header4", . . . , "Header30")

or

for i = 1 to 30
cells(1,i + 19).Value = "Header" & i
Next

--
Regards,
Tom Ogilvy

"Glen Mettler" wrote in message
...
I want to start at column 20 and incrment by 1 and insert
a heading for each column - all via a macro.

I can capture the column index but I can't seem to
increment to the next column.

Help

Glen



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
Dragging across columns: I want column constant, but row increment CM Excel Worksheet Functions 7 April 30th 23 07:41 PM
Increment Maria Excel Worksheet Functions 4 November 9th 07 12:10 AM
Excel Increment columns in rows FGM Excel Discussion (Misc queries) 4 January 3rd 05 04:24 PM
Excel VBA-How do I increment columns in VBA? waveracerr[_5_] Excel Programming 1 February 5th 04 11:37 PM
Excel VBA-How do I increment columns in VBA? waveracerr[_4_] Excel Programming 2 February 5th 04 07:36 PM


All times are GMT +1. The time now is 11:52 PM.

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"