View previous topic :: View next topic 
Author 
Message 
Sithlyone Power User
Joined: 13 Jan 2012 Posts: 98

Posted: Wed May 30, 2012 11:04 am Post subject: (solved) How to write the IF formula with multiple results? 


Is there a way to write an "If" formula for multiple possibilities?
My issue is that I have 10 possible numbers that can be entered into a cell and I want to have the cell next to it to have another number based off of the random number.
For example:
my random numbers will be generated in cells: b2b7
My result numbers will be in cells: c2c7
Obviously B2 would match up with c2 and so on.
My results would be as follows:
If the random number is:
8 the result would be: 1
9 the result would be: 1
10 the result would be: 0
11 the result would be: 0
12 the result would be: 1
13 the result would be: 1
14 the result would be: 2
15 the result would be: 2
16 the result would be: 3
17 the result would be: 3
18 the result would be: 4
I'm sorry if this is confusing, please let me know if you need anymore info. Thank you for looking any help you can give me. _________________ I'm just a Newb trying to learn. Please don't assume I know what I am doing. Thanks for the help!
Last edited by Sithlyone on Wed May 30, 2012 12:08 pm; edited 1 time in total 

Back to top 


Ed Super User
Joined: 28 May 2003 Posts: 1041

Posted: Wed May 30, 2012 11:40 am Post subject: 


Is there any reason you have to use the "IF" function?
I notice the number on the right is always (half the number on the left) minus five, rounded down to the nearest integer. Why not calculate them as such instead of a complicated multiple IF formula?
=INT(B2/25)
should do perfectly well. 

Back to top 


Sithlyone Power User
Joined: 13 Jan 2012 Posts: 98

Posted: Wed May 30, 2012 12:08 pm Post subject: 


There you have it. Thanks so much, I knew there were much smarter people than I here!
Thanks Ed _________________ I'm just a Newb trying to learn. Please don't assume I know what I am doing. Thanks for the help! 

Back to top 


