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!
 
Joined
Feb 21, 2018
Messages
216
Reaction score
86
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.
 
Joined
Jul 22, 2018
Messages
5
Reaction score
4
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top