Aug 21 2021 08:21 PM
I'm having an issue in excel. Lets say I have a cell choose a random number, between 1 and 100, but if it chooses one specific number, something like 20, it will choose a different random number until it spits out something other than 20.
In my real example, 20 is variable.
Is there any way to do this?
Aug 22 2021 03:48 AM
Aug 22 2021 04:53 AM
Using Excel 365 Insider beta there are things called Lambda functions.
= RANDλ(20)
where RANDλ is defined by
= LAMBDA(exclude,
LET(
r, RANDBETWEEN(18,22),
IF(r=exclude,RANDλ(exclude),r)
)
)
This is not for the fainthearted!
Aug 22 2021 06:28 AM