is it possible if let say i have a thing called Points under that there’s a field User ID and Points and i want to get the Return Points, if the total points is greater than the Amount match then i will subtract Total Points to Amount to match, and get the Return Points of each Users

ex.
A = 1200 Total Points
B = 550 Total Points

i need to match A to B which is 550

**Sample Points per Users **

User ID = 1
Points = 200

User ID = 2
Points = 500

User ID = 3
Points = 500

Total Points = 1200

Amount to match = 550

Return Points of each Users = ?

Formula
IF Total Points = 1200 > Amount to match = 550, then IF “Yes” Return Points = Total Points - Amount to match

in numbers it will be 1200 - 550 = Return Points

this is easy if there’s only 2 Users, user id 2 will get 650 as Return Points but what if there’s more than 2 like my example above?

base on the ex. points above User ID 2 will get 150 Return Points and User ID 3 will get 500 Return Points because i only need 550 since User ID 1 has already 200 Points and User ID 2 will just need 350 from his 500 Points to make it a total of 550 from User 1 & User 2.

how can i do that in the workflow?

i think i may get the Return Points of User ID 3 if i do this formula
IF total amount - total amount from item:#2 = User ID 3 Return Points
in numbers it will be 1200 - 700 (User 1 = 200 + User 2 = 500) = 500 Return Points for User ID

for this my question is how can i do it if i have more than 2 or 3 users depends and on their points? like i think i need to change the total amount from item:#(number)

I don’t follow your explanation. Sorry I can’t help. Do you mean you want to distribute the Return Points amongst all users proportionally to their point value?

Perhaps if you explain your requirement using other words.

yes, i want to get each users Return Points but i didn’t know how to do it what i know is

to get the return points of the 2nd User (not the 2nd to the latest) is to add(sum) the points of user 1 and user 2 then minus it to Amount to match

and to get the return points of the 3rd user i need to get the Total Points of all users then minus it to User 1 points and User 2 points

then for the 4th user i need to do the same process which is get the Total Points of all users from 1 to depends on how man users i have, then minus it to user points 1, 2 & 3 then repeat the process for 5th user and so on.

so it means it needs to create a list of Return Points for each Users