Hi all
I'm running a validation, basically checking the total amount entered per voucher no but have one small challenge left:
How do I get it to do it only once per VouchNo in case of duplicate VouchNo?
I hope I make some sense and there is an easy fix
.
Thanks,
Kjaer
Script (or at least the relevant part of it:
Dim VouchNo As Variant
For Each VouchNo In myVoucherData
If Not IsEmpty(VouchNo) Then
VoucherSum = Application.SumIf(myVoucherData, VouchNo, myCurAmountData)
If Abs(VoucherSum) > 0.000001 Then
MsgBox ("WARNING: Voucher no. " & VouchNo & " does not balance in currency amount")
End If
End If
Next VouchNo
I'm running a validation, basically checking the total amount entered per voucher no but have one small challenge left:
How do I get it to do it only once per VouchNo in case of duplicate VouchNo?
I hope I make some sense and there is an easy fix

Thanks,
Kjaer
Script (or at least the relevant part of it:
Dim VouchNo As Variant
For Each VouchNo In myVoucherData
If Not IsEmpty(VouchNo) Then
VoucherSum = Application.SumIf(myVoucherData, VouchNo, myCurAmountData)
If Abs(VoucherSum) > 0.000001 Then
MsgBox ("WARNING: Voucher no. " & VouchNo & " does not balance in currency amount")
End If
End If
Next VouchNo