03-10-2009, 11:13 AM
1,,,count1=es4.NumRows+1
2,,,for count 2 count1
3,,,,es4.GetCell(scrip 1 count)
4,,,,out "%i %s %s %i" count scrip am[acount 1] acount
5,,,,if scrip=am[acount 1]
6,,,,,es4.GetCell(qty 2 count)
7,,,,,qty=val(qty)+val(am[acount 2])
8,,,,,if val(qty)=0
9,,,,,,rang.from(count ":" count)
10,,,,,,es4.ws.Range(rang).Delete
11,,,,,,am.remove(acount)
12,,,,,,acount=acount-1
13,,,,,,row=row-1
14,,,,,else
15,,,,,,es4.SetCell(qty 2 count)
16,,,,,,am.remove(acount)
17,,,,,,acount=acount-1
Now on Line 10 & 11 if the total of both strings is 0 then the excel row & the array element should delete itself.