How to Increment columns

G

Glen Mettler

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
 
T

Tom Ogilvy

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

or

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