Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default How can I rewrite this using an Array?

Since the cells are sequential is there some way to use FillRight?

"Tom Ogilvy" wrote:

Sub AddHeaders()
ncol = 56
Rows(1).Insert
Range("A1").Resize(1,ncol).Formula = "=""D""& Column()"
Range("A1").Resize(1,ncol).Formula = _
Range("A1").Resize(1,ncol).Value
End Sub

I don't see where adding an array into the equation would be of any
advantage.

--
Regards,
Tom Ogilvy

"Fred" wrote in message
oups.com...
Thanks Tom, much cleaner...

But what if I did not want to specify my ending column. In this case I
needed 56 columns so I counted over manually to find the 56th column.
But what if I wanted the 213th column.

I was thinking an Array for this: Range("A1:BD1").




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
vlookup [rewrite] Janis Excel Discussion (Misc queries) 0 July 25th 07 10:36 PM
How to Rewrite these Code? hce[_18_] Excel Programming 0 September 29th 04 09:33 AM
How to Rewrite these Code? hce[_17_] Excel Programming 1 September 29th 04 04:16 AM
How to Rewrite these Code? hce[_16_] Excel Programming 1 September 29th 04 03:33 AM
How to Rewrite these Code? hce[_15_] Excel Programming 1 September 29th 04 01:22 AM


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

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"