New Contributor

# Help with Running a formula within a formula for multiple individual results

Ok, how best to explain my dilemma.

I am trying to program a simulation of multiple events based on a couple of factors. Bear with me, and my Excel file is protected information so I can't share it but will show the Formulas.

The Base line:

=IF(B226=1,(IF(\$N\$228=\$R\$223,\$O\$229,

IF(\$B\$223=\$P\$228,\$Q\$228,IF(\$B\$223=\$P\$229,\$Q\$229,IF(\$B\$223=\$P\$230,\$Q\$230,IF(\$B\$223=\$P\$231,\$Q\$231)))))),"")

The Bold is the focus, referring to this simple reference line of code:

RANDBETWEEN(1,20)+C223

(C223 refers to another variable number per a different factor, which doesn't impact my problem.)

So, I have multiple instances (cells) of my baseline, but I can't figure (or know if it's possible) to have when the IF(\$N\$228=\$R\$223,\$O\$229 is True, to run that reference formula in that cell as the result. As it is now, it will return with the formula itself "RANDBETWEEN(1,20)+C223" as the answer instead of running the formula.

I can't use the "=" in front of the formula in the reference cell, because then it will solve that formula there (once), which is no good, because then all my instances will come back with the same result, when I need each instance to solve with its own random number. I tried a couple of things, but am failing to resolve this.

All help appreciated.