Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Jan 2001
    Location
    North Providence, Rhode Island, USA
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MultiConditional formula

    What I am looking to do is the following:

    I am looking for help with an Excel formula

    I want to enter a formula that looks at E2 and enter in E4 and puts 8 if E2 is 1; 4 if E2 is 2; 2 if E2 is 3; 1 if E2 is 4; 0 if E2 is 5.
    Any idea??

  2. #2
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    La Jolla, CA
    Posts
    1,470
    Thanks
    30
    Thanked 62 Times in 58 Posts
    =if(e2=5,0,2^(4-e2))

  3. #3
    Star Lounger
    Join Date
    Jan 2001
    Location
    North Providence, Rhode Island, USA
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you so much. Now if I want to keep everything the way it is and expand it to if I enter a 6 or 7 in E2 it will put a -1 in E4

  4. #4
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    La Jolla, CA
    Posts
    1,470
    Thanks
    30
    Thanked 62 Times in 58 Posts
    What do you want the result to be when you enter a 6 or 7? Your pattern suggested powers of 2 based on E2.

    =IF(E2=5,0,IF(OR(E2=6,E2=7),-1,2^(4-E2)))
    Last edited by kweaver; 2012-07-24 at 11:54.

  5. #5
    Star Lounger
    Join Date
    Jan 2001
    Location
    North Providence, Rhode Island, USA
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thank you

    Thank you so much. I failed to see the relationship of powers to 2. Many thanks again

    Ed

  6. #6
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    La Jolla, CA
    Posts
    1,470
    Thanks
    30
    Thanked 62 Times in 58 Posts
    You might also consider another option: =CHOOSE(E2,8,4,2,1,0,-1,-1)

  7. #7
    Star Lounger
    Join Date
    Jan 2001
    Location
    North Providence, Rhode Island, USA
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thank you

    Thanks again. This one is easier to understand, however both are deeply appreciated.

Tags for this Thread

Posting Permissions

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