How to find out how many of each 2, 3 and 4 required to fit in 100 using excel?

42 Views Asked by At

I want to determine the numbers or counts of each 2, 3, and 4 required to fit in 100.

I got the formula in Excel which can only return the numbers for two given variables i.e. 2, 3. I want to try for three variables or more. I got the following formula for two variables from Tom Sharpe's answer to How to find how many times numbers fit into a large number:

=LET(x,A2,y,B2,z,C2,
seq,SEQUENCE(1,z/x-0.1),
modDiff,MOD(z-seqx,y),
diff,IF(modDiff=0,0,y-modDiff),
minDiff,MIN(diff),
FILTER(seq&"X"&x&","&QUOTIENT(z-seqx+diff,y)&"X"&y,diff=minDiff))

I am unable to manipulate this formula for three variables.
I was expecting to be able to find out the solution but I could not.

0

There are 0 best solutions below