You can tidy it a tiny amount by combining some of the lines with the same output
For example, these two lines
Case 1498: iTotal = iTotal + 20
Case 1499: iTotal = iTotal + 20
can be written on one line as
Case 1498, 1499: iTotal = iTotal + 20
I don't think it would make any difference to the speed of the macro either way.
The maths is NOT likely to be right when there is a minus sign. It would certainly be wrong if there are two of them (eg a - b - c) since all I was doing was flipping the sign of the running total when the macro hits it. Unfortunately I don't know anything about right to left language equations so that is something you will need to solve if it bothers you.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|