You can use mulitiple arrays for your data, and then just do a recursion through one of the arrays to add the sums up.

Assuming data lines = "Date|account#|account type|work description|balance"

 Code:
$count1 = 0
$RL = Readline(1)
  While not @error
  $Bits = Split($RL)
  If InArray($Array,$Bits[1] <0
   $Array[$count1] = $Bits[1]
   $Array2[$count1] = $Bits[66]
   $Count1 = $Count1 + 1
  EndIf
 Loop

For each $Value in $Array2
  $sum = $sum + $value
Next


Not the most elegant, but it can do what you want.
_________________________
Today is the tomorrow you worried about yesterday.