I have a table of data. I need to input this data into an array, manipulate this data. Then output this data to a spreadsheet. My problem is knowing how the best way to accomplish this currently I am doing this to input a column of data
Function GetData()
'Initializes variables
Number_Of_Entrees = 0
Mover = 0
'This loop loops through until there is no information provided
Do Until IsEmpty(Worksheets("force input"
.Cells(Number_Of_Entrees + 2, 2).Value)
Number_Of_Entrees = Number_Of_Entrees + 1
Loop
'Resizes the array
ReDim Acceleration_Of_Projectile(0 To (Number_Of_Entrees - 1))
'The following loop is used to input all the accelerations, sets the values in the arrray to the acceleration
Do Until IsEmpty(Worksheets("force input"
.Cells(Mover + 2, 2).Value)
Acceleration_Of_Projectile(Mover) = Worksheets("force input"
.Cells(Mover + 2, 2).Value
Mover = Mover + 1
Loop
GetData = Number_Of_Entrees 'Returns the number of data points
End Function
I was hoping there was an easier way to input all the data without two for loops for this takes lots time for a large spreadsheet
Function GetData()
'Initializes variables
Number_Of_Entrees = 0
Mover = 0
'This loop loops through until there is no information provided
Do Until IsEmpty(Worksheets("force input"
Number_Of_Entrees = Number_Of_Entrees + 1
Loop
'Resizes the array
ReDim Acceleration_Of_Projectile(0 To (Number_Of_Entrees - 1))
'The following loop is used to input all the accelerations, sets the values in the arrray to the acceleration
Do Until IsEmpty(Worksheets("force input"
Acceleration_Of_Projectile(Mover) = Worksheets("force input"
Mover = Mover + 1
Loop
GetData = Number_Of_Entrees 'Returns the number of data points
End Function
I was hoping there was an easier way to input all the data without two for loops for this takes lots time for a large spreadsheet