OK - I have csv files that are raw data for a research study. We no longer have the original software to read the data so we have to find a way to do it in excel.

It is in this format when opened:

159A
11/7/2001
{start}
0.00 No Obj
11.96 E:SimMan
13.06 E:Indisc
28.16 No Obj
30.96 E:Indisc
52.80 No Obj
62.60 E:Indisc
78.83 No Obj
116.76 E:Indisc
132.20 No Obj
137.16 E:Indisc
141.46 R:PrsGen
145.50 No Obj
147.76 E:Indisc
153.90 R:PrsGen
157.60 No Obj
169.03 E:Indisc
86399.9 {end}
{notes}


each of those are on one row, and all info is in one cell.

I use find and replace to remove the space in No Obj to make it NoObj, then I use "text to columns" to separate the numbers from the text which pulls the two into different cells - that all works perfect.

Here is what I need next: these data are for an childhood autism study - and each line is an amount of time (in seconds). I need to create a formula that will pull out the data and time in such a way that I can then calculate how many seconds each behavior group had, what the duration of each (and total) were and how much time between each. I have it calculating the difference between the time in the previous cell and creating a new cell value called difference, but I need it to be able to also calculate the grouped (based on behavior type - NoObj (No Object), SimMan (Simple Manipulation), PrsGen, etc)).

Is there a way to write a script that can automate this process? We have 1000 files like this to go through.

Any help... I am not an excel programmer, but figured out how to get half of what I need done done, any thoughts on the last half?