vds1
Well-known Member
- Joined
- Oct 5, 2011
- Messages
- 1,200
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]ID_SPAR[/TD]
[TD]ID_ITOR[/TD]
[TD]AMOUNT[/TD]
[TD]DESIRED OUTPUT[/TD]
[/TR]
[TR]
[TD]3221876[/TD]
[TD]4448945[/TD]
[TD]-51471.74[/TD]
[TD]Matched[/TD]
[/TR]
[TR]
[TD]3221876[/TD]
[TD]4448945[/TD]
[TD]-54452.02[/TD]
[TD]Investigate[/TD]
[/TR]
[TR]
[TD]3221876[/TD]
[TD]4448945[/TD]
[TD]22239.20[/TD]
[TD]Matched[/TD]
[/TR]
[TR]
[TD]3221876[/TD]
[TD]4448945[/TD]
[TD]29232.54[/TD]
[TD]Matched[/TD]
[/TR]
[TR]
[TD]3227654[/TD]
[TD]4448974[/TD]
[TD]-28956.90[/TD]
[TD]Matched[/TD]
[/TR]
[TR]
[TD]3227654[/TD]
[TD]4448974[/TD]
[TD]-25917.90[/TD]
[TD]Investigate[/TD]
[/TR]
[TR]
[TD]3227654[/TD]
[TD]4448974[/TD]
[TD]28956.90[/TD]
[TD]Matched[/TD]
[/TR]
[TR]
[TD]3227678[/TD]
[TD]4448952[/TD]
[TD]34569.00[/TD]
[TD]Investigate[/TD]
[/TR]
[TR]
[TD]3227679[/TD]
[TD]4448953[/TD]
[TD]45102.00[/TD]
[TD]Investigate[/TD]
[/TR]
</tbody>[/TABLE]
Hello Gurus,
For same ID_SPAR and same ID_ITOR , i would like to find the set of amounts which sums up to zero and insert Matched in column D, if not the Investigate. My desired output is in column D which needs to be populated using VBA. Ideally if you filter Desired output by matched then amount sum will be zero.
There could be any number of positive amounts combinations matching to any number of negative amounts combinations.
I have colored the rows which sums the amount to zero. Hope this helps.
VBA or Formula would be appreciated.
Thanks,
<tbody>[TR]
[TD]ID_SPAR[/TD]
[TD]ID_ITOR[/TD]
[TD]AMOUNT[/TD]
[TD]DESIRED OUTPUT[/TD]
[/TR]
[TR]
[TD]3221876[/TD]
[TD]4448945[/TD]
[TD]-51471.74[/TD]
[TD]Matched[/TD]
[/TR]
[TR]
[TD]3221876[/TD]
[TD]4448945[/TD]
[TD]-54452.02[/TD]
[TD]Investigate[/TD]
[/TR]
[TR]
[TD]3221876[/TD]
[TD]4448945[/TD]
[TD]22239.20[/TD]
[TD]Matched[/TD]
[/TR]
[TR]
[TD]3221876[/TD]
[TD]4448945[/TD]
[TD]29232.54[/TD]
[TD]Matched[/TD]
[/TR]
[TR]
[TD]3227654[/TD]
[TD]4448974[/TD]
[TD]-28956.90[/TD]
[TD]Matched[/TD]
[/TR]
[TR]
[TD]3227654[/TD]
[TD]4448974[/TD]
[TD]-25917.90[/TD]
[TD]Investigate[/TD]
[/TR]
[TR]
[TD]3227654[/TD]
[TD]4448974[/TD]
[TD]28956.90[/TD]
[TD]Matched[/TD]
[/TR]
[TR]
[TD]3227678[/TD]
[TD]4448952[/TD]
[TD]34569.00[/TD]
[TD]Investigate[/TD]
[/TR]
[TR]
[TD]3227679[/TD]
[TD]4448953[/TD]
[TD]45102.00[/TD]
[TD]Investigate[/TD]
[/TR]
</tbody>[/TABLE]
Hello Gurus,
For same ID_SPAR and same ID_ITOR , i would like to find the set of amounts which sums up to zero and insert Matched in column D, if not the Investigate. My desired output is in column D which needs to be populated using VBA. Ideally if you filter Desired output by matched then amount sum will be zero.
There could be any number of positive amounts combinations matching to any number of negative amounts combinations.
I have colored the rows which sums the amount to zero. Hope this helps.
VBA or Formula would be appreciated.
Thanks,
Last edited: