Thread: Arrays
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Lacy Lacy is offline
external usenet poster
 
Posts: 3
Default Arrays

I'm using an array, but I don't know the number of rows.
Does anyone know if I can do this.

Dim Defect() As Variant, Sum As Single, RowCount As Variant
Dim Count As Single, GrandTotal As Integer


RowCount = ActiveWorkbook.Worksheets("Sheet1").Cells
(Rows.Count, 10).End(xlUp).Value < ""
ReDim Defect(RowCount, 34)

For i = 1 To RowCount
For j = 1 To 34
Defect(i, j) = ActiveWorkbook.Worksheets
("Sheet1").Cells(i, j)
Next j
Next i

Thanks,
Lacy