Could anyone give me a hand trying to figure this out.
I am trying to collect array data (dynamic array) and am running an array to collect the numbers, a second array to collect the names assocaited with the numbers and then have to run a third array to collect the file label associated with the number. The arrays will collect and the numbers of each array are identical but the problem is three fold -
First, I can't get the arrays to keep going. This is how I collect the array data for each array except that the name of the array changes.
Num = 0
Range("A1").Select
Do
ReDim Preserve NameArray(Num)
If IsEmpty(ActiveCell) Then
Exit Do
End If
NameArray(Num) = ActiveCell.Value
ActiveCell.Offset(1, 0).Select
Num = Num + 1
Loop
Range("B1").Select
Num = 0
Do
ReDim Preserve NumberArray(Num)
If IsEmpty(ActiveCell) Then
Exit Do
End If
NumberArray(Num) = ActiveCell.Value
ActiveCell.Offset(1, 0).Select
Num = Num + 1
Loop
This works great but would a two dimensional array work better?
Second, I want to collect the names and numbers of the data but also have several file numbers to associate with each of the names collected (its for a report).
These arrays are to collect file data. So for sake of example - a manager is listed, the managers floor is listed and under each manager comes each employee on the floor.
Is this three simple arrays, a two dimensional array with a seperate array for each managers name showing employees, or is it a three dimensional array?
Any ideas?
I am trying to collect array data (dynamic array) and am running an array to collect the numbers, a second array to collect the names assocaited with the numbers and then have to run a third array to collect the file label associated with the number. The arrays will collect and the numbers of each array are identical but the problem is three fold -
First, I can't get the arrays to keep going. This is how I collect the array data for each array except that the name of the array changes.
Num = 0
Range("A1").Select
Do
ReDim Preserve NameArray(Num)
If IsEmpty(ActiveCell) Then
Exit Do
End If
NameArray(Num) = ActiveCell.Value
ActiveCell.Offset(1, 0).Select
Num = Num + 1
Loop
Range("B1").Select
Num = 0
Do
ReDim Preserve NumberArray(Num)
If IsEmpty(ActiveCell) Then
Exit Do
End If
NumberArray(Num) = ActiveCell.Value
ActiveCell.Offset(1, 0).Select
Num = Num + 1
Loop
This works great but would a two dimensional array work better?
Second, I want to collect the names and numbers of the data but also have several file numbers to associate with each of the names collected (its for a report).
These arrays are to collect file data. So for sake of example - a manager is listed, the managers floor is listed and under each manager comes each employee on the floor.
Is this three simple arrays, a two dimensional array with a seperate array for each managers name showing employees, or is it a three dimensional array?
Any ideas?