View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Fred[_21_] Fred[_21_] is offline
external usenet poster
 
Posts: 18
Default How can I rewrite this using an Array?

I have the below block of code that adds a simple header row:
-------
Public Sub add_headers()

Rows("1:1").Select
Selection.Insert Shift:=xlDown
Range("A1:BD1").Select
Selection.NumberFormat = "@"

Count = 0

For Each cell In Selection
Count = Count + 1
cell.Value = "D" & Count
Next cell

End Sub
-------

How can I rewrite this using an Array to indicate my range instead of
selecting it? The Array would have 56 elements.

Thanks
Fred