+ Reply to Thread
Results 1 to 7 of 7

Having trouble building a probability code within a Cell.

  1. #1
    Registered User
    Join Date
    12-28-2011
    Location
    chicago
    MS-Off Ver
    Excel for mac 2011
    Posts
    4

    Having trouble building a probability code within a Cell.

    Does anyone know how to properly write this formula to insert in a Excel Cell. "if [E1 is between 0 to 299 multiply by .15, if E1 is between 300 to 499 multiply by .26, if E1 is over 500 multiply by .33]+D1" I want to know if its possible to do it that complicated in just one cell. I am able to do the basic, for say anything i put in E1 i can multiply by x then add by D1. But I need to work with probability then the answer I get just add by D1. I just don't know If Excel can work with such a complicated formula.


    Thanks for reading and hope you can help.


    Thanks!
    Last edited by kardoid; 12-29-2011 at 04:07 PM. Reason: incorrect title

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Can I get some help in building a formula. or know if its even possible to write

    Welcome to the forum, kardoid.

    Please take a few minutes to read the forum rules, and then amend your thread title accordingly.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    12-28-2011
    Location
    chicago
    MS-Off Ver
    Excel for mac 2011
    Posts
    4

    Re: Having trouble building a probability code within a Cell.

    Thanks for the advice. Read the rules and renamed the post.

  4. #4
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Having trouble building a probability code within a Cell.

    Hello kardoid,

    use LOOKUP function, like,

    =E1*LOOKUP(E1,{0,300,500;1.15,1.26,1.33})+D1
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  5. #5
    Registered User
    Join Date
    12-28-2011
    Location
    chicago
    MS-Off Ver
    Excel for mac 2011
    Posts
    4

    Re: Having trouble building a probability code within a Cell.

    Thanks Haseeb! it worked great! The only thing I had to do at the end of the formula was =E1*LOOKUP(E1,{0,300,500;1.15,1.26,1.33})-E1+D1, because it was adding the percentage to the original number. But after that it came out fine. Thanks once again!

  6. #6
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Having trouble building a probability code within a Cell.

    Quote Originally Posted by kardoid View Post
    ...it was adding the percentage to the original number...
    That because, I thought you need E1+E1%+D1, if you only multiply it's % then +D1, just change the 1.15,1.26,1.33 to 0.15,0.26,0.33. like,

    =E1*LOOKUP(E1,{0,300,500;0.15,0.26,0.33})+D1


    If you are satisfied in the solution(s) provided, pleas mark your thread as SOLVED.

    To mark your thread solved do the following:
    - Go to the first post
    - Click edit
    - Click Advance
    - Just below the word "Title:" you will see a dropdown with the word No prefix.
    - Change to Solve
    - Click Save

  7. #7
    Registered User
    Join Date
    12-28-2011
    Location
    chicago
    MS-Off Ver
    Excel for mac 2011
    Posts
    4

    Re: Having trouble building a probability code within a Cell.

    That is great! it works even better! because I was adding another part to the formula but since it had that -E1 it wasn't letting me. But now its all resolved. Thanks a million!!

+ 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