not exactly sure what you're trying to accomplish, but:
Option Base 1
Sub test()
Dim arr() As String
Dim i As Long, n As Long
For i = 1 To 18
If i Mod 2 = 1 Then
n = n + 1
ReDim Preserve arr(1 To n)
arr(n) = Cells(1, i).Value
End If
Next
End Sub
--
Gary
"John" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> thanks... that did it.
>
> Have another problem now. The countif doesn't work with a range I put together
> using "union" I took a chance on that.
>
> ----
> Dim Rows(9) as Range
> Set Rows(n) = Union(Cells(n, 1), Cells(n, 3), Cells(n, 5))
> ----
>
> I'm trying to have a collection or range or array of evey other cell in a row
> that i can work with. Is that possible as a range? I tried to read about
> collections but just got screwed up.
>
> thanks
>
> John
>
> Gary Keramidas wrote:
>> try WorksheetFunction.CountIf
>>
|