Basically, what we are trying to attain here is if the amount positive or negative will equal to zero which will be tagged as âMATCHEDâ, but if not, âUNMATCHEDâ then if there is no corresponding number partner, it will be tagged as âUNIQUEâ like number 6 and 7.

Hello @rfeigel, already got it! Thanks for your response but I think it will not cover all because all of these data are in one column that is why in my first statement, we do sorting of amount then whichever will be the partner or possible a unique amount.

Hi @trafalgarlaw , Iâm still not getting it. You appear to want a different output now to the one you initially showed. You also havenât explained to me what you consider a ânumber partnerâ to be. Maybe itâs obvious to you so could you please state exactly the requirement.

I also donât see the purpose of all the getting rid of the negative signs that you did in the first example if you then need to produce the table containing negative signs in you later example. I guess that was you describing your method rather than part of the requirement.

Better to describe your input data, your required output data, and the transformation rules rather than trying to suggest an approach as it gets confusing to people about what is the requirement and what isnât.

I can make assumptions but Iâm not going to because that increases the iterations required to get to the solution. So instead I have more questions.

I have questions such as:

Is -0.09 considered a partner for 0.00?

Is 0.09 consisted a partner for 0.00?

Is 82.02 considered a partner for -82.01?

Is 82.02 considered a partner for -82.03?

Is 82.9 considered a partner for -82?

Is 79.99 considered a partner for -80.01?

Is 80.00 considered a partner for -79.99?

Is 80.01 considered a partner for -79.99?

Can you explain in each case why it is or isnât a ânumber partnerâ.
Thanks.

Iâm with @takbb, i.e. thoroughly confused. I think I provided a solution for your first data set since it had an order which could be subjected to rules. The second data set has no apparent order. For example, the first three â82.00â are compared to the first three â-82.xâ. The next two â82.00â have nothing to match. Iâm struggling with how to write rules that differentiate such data in a single list.

Really sorry for the confusion and did not provide the complete set of complex sample data.

But to answer your questions, I put it in a table for better presentation so better disregard my first approach on getting rid of the negative sings to avoid more confusion. We could stick on the table presentation for better understanding.

Now, letâs go with the questions. It seems all the numbers youâve provided are all âUNMATCHEDâ given that the requirement to be âMATCHEDâ is no discrepancy between the two meaning even .01 difference could be tagged as âUNMATCHEDâ. So, it is critical not to round-off any decimal to ensure the accuracy of number matching.

Just to simplify, we may tag âUNIQUEâ for all if thereâs no number partner to avoid complexity of the tagging which I put here.

Positive

Negative

Difference

Tagging

82.00

82.00

UNMATCHED

82.00

82.00

UNMATCHED

87.00

87.00

UNIQUE

We may go like this:

Positive

Negative

Difference

Tagging

82.00

82.00

UNIQUE

82.00

82.00

UNIQUE

87.00

87.00

UNIQUE

Not sure if this clarify the confusion / queries. But still happy to provide further information should be needed. Thank you so much for putting some attention to this, it will really help a lot!

I still donât have a clear confirmation of the difference between unmatched and unique. What is the cutoff or rule that determines this choice.

You said that all of the list i gave are unmatched, so is it unmatched if one number is positive and the other is negative, and the absolute difference is less than 1.0 , but greater than 0.0?

I believe itâs clearly defined rules like this that are needed if you are going to get a solution outside of machine learning

I agree with @takbb that clear definitions of the categories are critical. Let me reiterate that the order of the list is equally important so we can do proper comparison of entries. Thatâs where Iâm stuck.

Iâve missed the important info which will answer all of your questions. The number partnering if the difference will fall up to â.03â. For example 80.01 and -79.99, this will be a partner as the difference is 0.02 which will be tagged as âUNMATCHEDâ. Then if sample amount is -0.09 and 0.00, difference of this is -0.09 which will fall as âUNIQUEâ.

In summary:

If no difference, it will fall as âMATCHEDâ
If difference is less than or equal .03, it will fall as âUNMATCHEDâ
Everything above .03 difference will fall as âUNIQUEâ

Feel free to ask more questions for clarity. Thank you!