How to create a Random Number Generated Subtraction Problem

I want to generate 2 random numbers and subtract them … Rand1 (1,1000) - Rand2(1,Rand1-1) … how do I do it … I want the output to be … 417-291=

Thanks in advance for your help.

=LET(
     x;RANDBETWEEN.NV(1;1000);
     y;RANDBETWEEN.NV(1;x-1);
     x&" - "&y&" = " &x-y
    )
2 Likes

Fwiw, the LET() function was added in LO 24.8.