View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default array values not matching

For Each c In Range(tlcapscell,blcapscell).Offset(0, colnumarr(colnum))



Steve wrote:

I am trying to use an array to change a column number, based on the
array values. However, the variable (colnum) remains starts at 0, then
1, etc. instead of 2,6,8,10,12:

Dim c As Range
Dim colnumarr As Variant
Dim colnum As Integer

colnumarr = Array(2, 6, 8, 10, 12)

For colnum = LBound(colnumarr) To UBound
(colnumarr)
For Each c In Range(tlcapscell,
blcapscell).Offset(0, colnum)
c.Value = UCase(c.Value)
Next
Next

Thanks...


--

Dave Peterson