TryingToLearn
Well-known Member
- Joined
- Sep 10, 2003
- Messages
- 733
I'm trying to "consolidate" the values in a cell through vba. Over the course of a month, any number of entries can be made to this cell as a + or a -. End of month I'm just looking for the "leftover" values that don't have a matching opposite, so the following entry:
=$A$3+4105.38-4200+817.6+4200+79+204-204-4105.38-817.6-79+55+402+750-750+264.32-500+500-55-264.32-750+750-6500+6423+2105.98-2500+79+6500-402
would become:
=$A$3-55+6423+2105.98-2500+79
Since there can be any number of digits and/or decimal places and no pattern to the + or - signs, I'm stumped on how to parse a single amount to be able to compare it. Any suggestions to a direction would be appreciated.
=$A$3+4105.38-4200+817.6+4200+79+204-204-4105.38-817.6-79+55+402+750-750+264.32-500+500-55-264.32-750+750-6500+6423+2105.98-2500+79+6500-402
would become:
=$A$3-55+6423+2105.98-2500+79
Since there can be any number of digits and/or decimal places and no pattern to the + or - signs, I'm stumped on how to parse a single amount to be able to compare it. Any suggestions to a direction would be appreciated.