# Excel, Using Rand between Function Once Inside IF function with roughly 10 outcomes based on the value returned. (only 1 Cel)

I am trying to use an if function to generate random data for practicing purposes for my Colleague.

The formula goes as follows:

=IF(COUNTBLANK(E70)=1,"",(IF(E70="Shell Head office and Back",IF(RANDBETWEEN(1,10)<3,"MeetingatHeadOffice",IF(RANDBETWEEN(1,10)<6,"Report Submission","Training")),IF(RANDBETWEEN(1,10)<7,"Inspect - Oil Damage Claim",IF(RANDBETWEEN(1,10)<5,"Claim Finding Discussion","Incident Isolation")))))

This is a rough Idea of how I want to generate practice information for my Colleague to recon. There are multiple functions just like this one within the Document. I want to Lessen the Rand between function to only 1 and have multiple conditions with multiple outcomes as above.

• FYI, your formula as built will compute RANDBETWEEN 4 times, possibly giving you 4 different answers which will probably lead to following a different if() path than intended. – gns100 Feb 11 at 17:46

## 1 Answer

Say we wanted to implement:

But we want the formula to not repeat RANDBETWEEN() over and over and over. We can use CHOOSE() as follows:

=CHOOSE(RANDBETWEEN(1,10),"A","A","A","B","B","C","C","C","D","D")
• Is there perhaps a way to Use a certain percentage chance with the formula instead?, For example if I were to have my randbetween go from 1 to 100?. That will end up being too much to type in the end and I wont be allowed to type it all because of the letter limit in Excel. – Daniel 7 hours ago
• @Daniel yes...........check back later today...................... – Gary's Student 7 hours ago