Hello everyone
Please see attached. In the attachment, the desired result is in the Desired Result sheet.
The objective is to look at each transaction amount (either a Debit or Credit), determine the detail amounts that make it up, put a border around those detail amounts, then green highlight the transaction amount. Debit transaction amounts will be made up of positive detail amounts, and credit transaction amounts are made up of negative detail amounts. The detail amounts will always be in sequence. So the first transaction amount will be made up of the first n detail amounts. The second transaction amount will be made up of the next n detail amounts, and so on.
So for example, the first transaction is a debit of 6 (cell B3). The amounts 2, 1, and 3 (cells C12 to C14) make up this debit. Therefore, put a border around C12 to C14, then green highlight B3.
The second transaction is a debit of 10 (cell B4). The amount 10 (cell C15) makes up this debit. Therefore, put a border around C15, then green highlight B4.
The third transaction is a credit of 2 (cell C5). The amounts -1, and -1 (cells C16 to C17) make up this credit. Note that since it is a credit, then negative amounts make it up. Therefore, put a border around C16 to C17, then green highlight C5
And so on and so forth. I currently do this manually but it is very tedious since there can be many transactions. So I am hoping for a macro that can do this instead. I would really appreciate any assistance on this.
Bookmarks