+ Reply to Thread
Results 1 to 3 of 3

Random Chance Formula?

  1. #1
    MasterCoder84
    Guest

    Random Chance Formula?

    I need to create a random percentage in a cell so that every time I make a cell active it will display something different. For example every time A1 is active is has a 30% chance to say apple 10% chance to say banana and 60% chance to say orange. How do I do this?

    Thanks,

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Try

    =LOOKUP(RAND(),{0,0.3,0.4;"apple","banana","orange"})

  3. #3
    Forum Contributor
    Join Date
    12-30-2009
    Location
    US
    MS-Off Ver
    Excel 2003, 2010, 2016, 2019, & Office 365
    Posts
    194

    Re: Random Chance Formula?

    Hello,

    I searched the forum for this question and I found it, along with an answer, but how would I write this in VBA? I want to be able to push a button and have the data change when clicked.

    Thanks,

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1