Not solved problem in swedish forum

Hi

I´ve tried to find a solution to my problem in forums before without success. My english is not the best but i´ll try to explain my problem...pretty nice one :)

I have a table like example below with a lot of rows. I want to put in a sum (qty-column), lets say 35

NAME TEXT QTY ODDS
Adam Text1 23 1
Lisa Text2 12 2
Jack Text3 12 3
Karen Text4 14 1

I now want a new table that presents (random) rows that match my sum (35). On top of that i have a column for probability/odds. Rows with value 1 are picked/randomized twice as much as rows with value 2 and so on. Further i want some tolerance...there will be sums that cant be matched exactly. If i put in 1000 its ok to present rows that match 970 - 1030

NAME TEXT QTY
Adam Text1 23
Lisa Text2 12

Good luck...to u or me or...