Excel VBA to match positive and negative transactions

Joined
Dec 30, 2017
Messages
1
Reaction score
0
Hi!

I hope someone can assist me on this one.

It’s possible to write a vba code that can
match up multiple positive transactions against multiple negative transactions that offset to zero?

Thanks!
 
For such a requirement excel and VBA offer ABS function which converts -ve to +ve, thereafter you can compare the two numbers.

For example column A has all +ve numbers
A
300
400
800

Column B has all -ve numbers

B
-300
-400
-800

In Column C.....Now lets compare them using ABS Function

=A1-ABS(B1)
.....the answer is 0 ...means no difference.
 
add a column in your data and then put a formula for ABS() absolute value. Sort on absolute value then match rows. A VBA routine to do this is pointless since there will be multiple cells with same absolute value. This sounds like some sort of reconciliation routine. The issue is multiple rows with same absolute values. VBA would need some other identifier to differentiate similar rows.
 
Back
Top