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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting database from Word to Excel

Status
Not open for further replies.

mike101

Programmer
Jul 20, 2001
169
US
I am new at VBA. I am working with data for a science fair project, and the data is very very very precise. The data is taken every .02 seconds. I do not need all of this data. Here is an example line of data:
"2003153 21:00:00.000 284.00"

I would like to have VBA somehow take all of the data for 10 seconds... and make an average of it and just delete all of the other data. Then continue on to the next 10 seconds, and repeat. Finally, I would like to take all of this data and convert it to Excel to graph. Above... "21:00:00.000" is the time stamp, I would like to have it put that in one column in Excel, and the "284.00" in the next column, since that is the data number. Can anybody help me? I'm clueless. Thanks everybody!
 
What do you have for code so far?

This site is not intended for complete projects, moreso for the assistance in specific coding problems/errors.

You'll have to show us (by way of your programming code) that you have attempted to resolve your problem before we can guide you to a possible solution.

So, show us what you have so far.
--MiggyD
 
Just a few hints to get you started: Hopefully, your source data is not in Word but a text document. If it is truly a Word document, save it as a text document first. Then, you can import it easily into Excel. Then you should be able to manipulate the time stamp into useable data. Look up: Right(), Left(), and Mid(). You can combine the results of several by using a “&”, such as =Right(a1,2) & “/” & … If you want to use VBA, if it is saved as a text document, look at the example for “Line Input #”. VBA also has the Right(), Left(), and Mid() functions. Also, if you can change the way the time stamp is, I would recommend it. For example, 2003111, is this November 1, or January 11? Also, 2003/1/11 would be recognized by Excel without fancy manipulation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top