The first array has duplicate names .. ie. Brian, Brian, Graham, Graham, etc. (yes same people and need to be entered this way.
The second array containing associated sales amounts... $10, $5, $1, $6 etc.
I need to produce a report that says Brians sales are $15 and Graham's sales are $7, etc
Then I need a report that says.. Brian had the largest sales.
Here is my pseudo code so far
There are a total of 17 elements in each array Data is read from 2 files in another procedure
Total = 0
For k = 1 to 17
If Seller(k) = Seller(k-1)
Total = Total + Sales(k)
else
Total = Total + Sales(k)
Output:
"Total sales for " & Seller(k) & " " & Total
Total = 0
The output that I get is
Total sales for Brian $10
Total sales forGraham $1
Its only reading first dollar amount
Its not accumulating the totals by individual
any thoughts ???
Thanks in advance