I am trying to reconcile 2 input files - (1 is for "buys" and the other one is for "sells"). The idea is for each "buy" to be consumed by one or more "sell", if necessary or vice versa. So if the difference between the buy and the sell is negative (the sell amount is more than the buy amount) then the same "sell" is used by the next "buy" amount.
If the difference is positive (the buy amount is more than the sell amount) then the same "buy" is used by the next "sell" amount.
I looked at "santa's iterative macro" and looks like the way to go but i keep getting stuck due to the fact that i have 2 inputs.
Below is the screenshot of "sample" Input(s) and desired Output. TIA
