+ Reply to Thread
Results 1 to 7 of 7

IF (A1=1, then B1=0, C=2) and IF(B1=1, then A1=0 and C1 = 0) and IF(C1=1, then A1=0, B1=0)

  1. #1
    Registered User
    Join Date
    05-25-2017
    Location
    https://t.me/pump_upp
    MS-Off Ver
    2016
    Posts
    3

    IF (A1=1, then B1=0, C=2) and IF(B1=1, then A1=0 and C1 = 0) and IF(C1=1, then A1=0, B1=0)

    Dear All,
    I am randomly generating a set of numbers (in A Column), ranging from 1 to 0 (Where 1=True, and 0=False). I want Columns B and C to draw reference to A such that their random numbers will not conflict with the model based on A.
    Thus, I want a formula that looks like this:
    IF(A1=1, then B1=0, C=2) BUT IF(B1=1, then A1=0 and C1 = 0) OR/BUT IF(C1=1, then A1=0, B1=0)

    Note that A, B and C will randomly generate numbers based on the numbers in A, B or C.
    Thank you.

  2. #2
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: IF (A1=1, then B1=0, C=2) and IF(B1=1, then A1=0 and C1 = 0) and IF(C1=1, then A1=0, B

    Hi KwabenaTakyi- Excel formulae don't allow circular references, such as "the value of B depends on the value of A which depends on the value of B"

  3. #3
    Valued Forum Contributor
    Join Date
    05-08-2015
    Location
    Uvalde, TX
    MS-Off Ver
    2010
    Posts
    720

    Re: IF (A1=1, then B1=0, C=2) and IF(B1=1, then A1=0 and C1 = 0) and IF(C1=1, then A1=0, B

    Hi,

    Here are three formula's that may meet your criteria.

    A1
    Please Login or Register  to view this content.
    B1
    Please Login or Register  to view this content.
    C1
    Please Login or Register  to view this content.
    Cheers

  4. #4
    Registered User
    Join Date
    05-25-2017
    Location
    https://t.me/pump_upp
    MS-Off Ver
    2016
    Posts
    3

    Re: IF (A1=1, then B1=0, C=2) and IF(B1=1, then A1=0 and C1 = 0) and IF(C1=1, then A1=0, B

    Hi
    Thanks for your help..... the Codes for A1 and B1 run just fine, however C1 conflicts. The point is C1 should return 1 if and only if A1 and B1 are 0 each.
    the idea is that on a ROW of 4 (variables) choice of TRUE (1) can only be once and the others must return FALSE(0).
    Thank you and hope you provide further insight

  5. #5
    Registered User
    Join Date
    05-25-2017
    Location
    https://t.me/pump_upp
    MS-Off Ver
    2016
    Posts
    3

    Re: IF (A1=1, then B1=0, C=2) and IF(B1=1, then A1=0 and C1 = 0) and IF(C1=1, then A1=0, B

    Ok, so what if it has only a non looped reference? such as explained in the response to Southward?

  6. #6
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: IF (A1=1, then B1=0, C=2) and IF(B1=1, then A1=0 and C1 = 0) and IF(C1=1, then A1=0, B

    I suggest the following: add a fifth cell (say E1 for row 1):
    E1: =INT(RAND()*4), which yields {0,1,2,3}
    This gives each column an even chance.

    A1: =--($E1=0)
    B1: =--($E1=1)
    C1: =--($E1=2)
    D1: =--($E1=3)

    OR Better yet:

    E1: =INT(RAND()*4)+1, which yields {1,2,3,4}
    A1:D1 =--($E1=COLUMN())
    Last edited by leelnich; 05-25-2017 at 09:49 AM.

  7. #7
    Valued Forum Contributor
    Join Date
    05-08-2015
    Location
    Uvalde, TX
    MS-Off Ver
    2010
    Posts
    720

    Re: IF (A1=1, then B1=0, C=2) and IF(B1=1, then A1=0 and C1 = 0) and IF(C1=1, then A1=0, B

    OK. Change

    C1 to
    Please Login or Register  to view this content.

+ 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