I am not a fan of procedural programming in Mathematica (aka WPL). But . . . . .
In[15]:= set = Range[90];
In[16]:= n = 6; sum = 273;
In[17]:= subsets = {};
In[18]:= TimeConstrained[
Do[
For[
try = RandomSample[set, n]; count = 1,
Total[try] != sum,
count++,
try = RandomSample[set, n]
];
subsets = Append[subsets, try];
set = Complement[set, try];
, {15}
],
30]
In[19]:= subsets
Out[19]= {{44, 72, 18, 74, 25, 40}, {60, 34, 42, 24, 68, 45}, {7, 41,
27, 82, 36, 80}, {16, 47, 52, 66, 4, 88}, {53, 56, 89, 59, 3,
13}, {29, 55, 54, 9, 50, 76}, {67, 37, 20, 78, 43, 28}, {10, 32, 49,
69, 26, 87}, {51, 57, 38, 23, 31, 73}, {65, 6, 22, 46, 70,
64}, {15, 71, 39, 58, 11, 79}, {75, 86, 2, 21, 8, 81}, {5, 33, 77,
62, 84, 12}, {1, 61, 85, 90, 17, 19}, {63, 48, 83, 35, 30, 14}}