This is difficult to explain: 5 columns
Col1---Col2---Col3---Col4---Col5
1----1--- 10---Type1 --- $1.75
2----2--- 20---Type9 --- $1.75
3----2--- 30---Type11-- $1.75
4----2--- 50---Type16-- $1.75
5----3--- 90---Type2--- $1.75
6----3--- 100--Type3--- $1.75
7----4--- 90--- Type2--- $1.75
8----1--- 20--- Type4 --- $1.75

(no hyphens, just used to separate columns - newbie over here)
What I'm trying to do is combine the values of the instance of 3 as a sum, then the instance of 2 as sum and the two combined as the sum of 1. (IE) 4=$1.75, 3=$3.50, 2=$5.25 and 1 = $10.50. NOTE - the values are vastly different from one line to the next, $1.75 was used as an example only for easier math.

Now, underneath line #8 there is a new value of 1 so all the successive rows would need to have a sum similar to lines 1 through 6. The order is represented by Col1, the value by Col5, the line item break down by columns 2 and 3, Col 4 is simply the type/name if you will.

I'm at a loss on how to do this programmatically. A bit beyond my expertise. I am able to format this, pull it from a text file hopefully get the sums with the help of you kind people, then move it into an MS Access backend for storage.

Any help, or direction would be greatly appreciated. Thank you.