+ Reply to Thread
Results 1 to 6 of 6

If with choices

  1. #1
    Registered User
    Join Date
    04-06-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Question If with choices

    I need to look at a condition and then display from choices which have a weightage.

    Example: if (cell A = "yes", "yes", choice)

    where choice is either N or NO. N and NO should be picked 20%, 80% of the times respectively.

    I tried with rand like this

    if (cell A = "yes", "yes", if(rand()<0.2,"N", "NO"))

    But I see this changing every time there is a change in the sheet. In my case there are going to be tons of changes. I can use paste special and get away but I was wondering if there is any other option available in excel.

    Thanks for the help.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: If with choices

    Hi dumbs..

    Welcome to the forum.

    What is the triggering element (event) which will decide that N should be picked up 20% and NO should be picked up 80% of the times respectively.. is it the above data which is already there ?
    thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Registered User
    Join Date
    04-06-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: If with choices

    Hi DILIPandey,

    Thanks for the quick reply.

    The triggering element is random. So if the 2nd if statement is encountered 100 times then approximately 20 times I need to see "N" and and 80 times I need to see "NO"

  4. #4
    Forum Contributor bonny24tycoon's Avatar
    Join Date
    04-02-2012
    Location
    Hell
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    405

    Re: If with choices

    Hi dumbs,

    Can you attach an example sheet.. We can then interpret your query more better with accurate solutions.
    Thanks,

    Bonny Tycoon


  5. #5
    Registered User
    Join Date
    04-06-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: If with choices

    Here is an example sheet.

    Thanks again
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: If with choices

    You could change the Workbook Calculation to Manual. It is in the Options. Note that you would then need to force any future calculations (hit F9) and that would again reset your "N" or "No" cells. Paste values may be your best choice.

    Pauley

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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