Excel Functions Nesting

%3CLINGO-SUB%20id%3D%22lingo-sub-2559775%22%20slang%3D%22en-US%22%3EExcel%20Functions%20Nesting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2559775%22%20slang%3D%22en-US%22%3ECan%20a%20CHOOSE(RANDBETWEEN())%20fx%20be%20nested%20within%20a%20IF%20fx%20as%20its%20condition%2C%20to%20generate%20multiple%20random%20text%20outputs%3F%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2559775%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor
Can a CHOOSE(RANDBETWEEN()) fx be nested within a IF fx as its condition, to generate multiple random text outputs?
1 Reply

@Pallavi2603 

You can use something like

=CHOOSE(RANDBETWEEN(1,5),"Mary","Had","A","Little","Lamb")

You can get the same result using

=INDEX({"Mary","Had","A","Little","Lamb"},RANDBETWEEN(1,5))