Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

inputtig

Status
Not open for further replies.

brellis1

Programmer
May 22, 2003
9
PH
How can I input a whole column into an array, and output a column from an array
 
I'm not sure, but if you put more than an incorrectly spelled inputting in your title, you might attratct people who do. (No offense)

Try something like:

Printing a column to an array

Or Columns and arrays

Or Inputting to and from arrays

Sorry I can't tell you immediately, but thgat might help getting someone that can.
 
Sorry that I can't spell. Anyways, 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
 
by " a whole column" i assume you mean from excel?!?

how is the data saved? how r u pulling the data into VB??

If somethings hard to do, its not worth doing - Homer Simpson
------------------------------------------------------------------------
A General Guide To Excel in VB FAQ222-3383
The Great Date Debate Thread222-368305
File Formats Galore @ or
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top