I have excel file with transactions with ID (7 bytes) and ACCOUNT (8 bytes) and QUANTITY (positives and negatives numbers).
The macro would
If there is the same ID and ACCOUNT and lets say QUANTITY five 100 shares positive and QUANTITY five 100 shares negative color those QUANTITY cells green.
If there is the same ID and ACCOUNT and lets say QUANTITY five 100 shares positive and QUANTITY four 100 shares negative color those QUANTITY cells red.
If there is the same ID and ACCOUNT and lets say QUANTITY five 100 shares positive and no QUANTITY negative color those QUANTITY cells red.
The macro would first match ID and ACCOUNT and then look at the quantity field. I used 100 shares as an example. Meaning there could be transactions for 5 shares or 75 shares , quantity field could be any amount as well as positive or negative.
The macro would
If there is the same ID and ACCOUNT and lets say QUANTITY five 100 shares positive and QUANTITY five 100 shares negative color those QUANTITY cells green.
If there is the same ID and ACCOUNT and lets say QUANTITY five 100 shares positive and QUANTITY four 100 shares negative color those QUANTITY cells red.
If there is the same ID and ACCOUNT and lets say QUANTITY five 100 shares positive and no QUANTITY negative color those QUANTITY cells red.
The macro would first match ID and ACCOUNT and then look at the quantity field. I used 100 shares as an example. Meaning there could be transactions for 5 shares or 75 shares , quantity field could be any amount as well as positive or negative.