[Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register]

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: b2-b7 My result numbers will be in cells: c2-c7 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
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/2-5) should do perfectly well.
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!
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 8 Hours Page 1 of 1

 Jump to: Select a forum OpenOffice.org Forums----------------Setup and TroubleshootingOpenOffice.org WriterOpenOffice.org CalcOpenOffice.org ImpressOpenOffice.org DrawOpenOffice.org MathOpenOffice.org BaseOpenOffice.org Macros and APIOpenOffice.org Code Snippets Community Forums----------------General DiscussionSite Feedback
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum