+ Reply to Thread
Results 1 to 12 of 12

Resolve output based on numbers in a cell

  1. #1
    Registered User
    Join Date
    08-17-2015
    Location
    Europe
    MS-Off Ver
    2010
    Posts
    5

    Resolve output based on numbers in a cell

    Cell C3 is a Number, selected from a drop down menu.

    Basically, if this cell is specific numbers, I need cell C15 to reflect this based on the below.

    Is there a variation of the IF statement that I can use in cell C15 to reflect this?

    If C3=1 OR 2, fill in C15 with the number 2
    If C3=3 OR 4, fill in C15 with the number 4
    If C3=5 OR 6, fill in C15 with the number 6
    If C3=7 OR 8, fill in C15 with the number 8
    If C3=9 OR 10, fill in C15 with the number 10
    If C3=11 OR 12, fill in C15 with the number 12
    If C3=13 OR 14, fill in C15 with the number 14
    If C3=15 OR 16, fill in C15 with the number 16

    Thanks.

  2. #2
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Quebec, Canada
    MS-Off Ver
    2013
    Posts
    232

    Re: Resolve output based on numbers in a cell

    Two ways:

    First, the easiest would be a nested if: (In C15)

    =IF(C3<3,2,IF(C3<5,4,IF(C3<7,6,IF(C3<9,8,IF(C3<11,10,IF(C3<13,12,IF(C3<15,14,16)))))))

    That would work too:

    (EDIT: Forget it, made a mistake, here's the working one: )

    =IF(ROUND(C3/2,0)=C3/2,C3,C3+1)
    Last edited by Jdevil; 08-17-2015 at 12:48 PM.

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Resolve output based on numbers in a cell

    Try =CEILING(C3,2)

  4. #4
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Quebec, Canada
    MS-Off Ver
    2013
    Posts
    232

    Re: Resolve output based on numbers in a cell

    Quote Originally Posted by Pepe Le Mokko View Post
    Try =CEILING(C3,2)
    Did not know that was a thing. Neat!

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Resolve output based on numbers in a cell

    or

    =MROUND(C2,2)
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Resolve output based on numbers in a cell

    Or
    =INT((C2+1)/2)*2

    or
    =TRUNC((C2+1)/2)*2

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Resolve output based on numbers in a cell

    Orrrrrrrrr

    =CHOOSE(C2,2,2,4,4,6,6,8,8,10,10)

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Resolve output based on numbers in a cell

    Maybe

    =LOOKUP(C2, {1,3,5,7,9}, {2,4,6,8,10})

  9. #9
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Resolve output based on numbers in a cell

    Or if you want to impress

    =INDEX(ROW($A$1:$A$6)*2, INT((C2+1)/2))

    No one else wants to play?

  10. #10
    Registered User
    Join Date
    08-17-2015
    Location
    Europe
    MS-Off Ver
    2010
    Posts
    5

    Re: Resolve output based on numbers in a cell

    Thank you guys!

  11. #11
    Registered User
    Join Date
    08-17-2015
    Location
    Europe
    MS-Off Ver
    2010
    Posts
    5

    Re: Resolve output based on numbers in a cell

    Newbie to forum question: how do I mark the thread as resolved?

  12. #12
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Resolve output based on numbers in a cell

    Go to your first post and on the middle right is "Thread Tools dropdown. Should be "Mark as Solved" in there.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Output a specific number from range of numbers in one cell
    By Sigmaiota in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-18-2014, 01:03 AM
  2. Search cell text and output different values based on result in another cell
    By tbarn1980 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-14-2013, 09:54 PM
  3. Replies: 3
    Last Post: 06-03-2013, 05:25 PM
  4. Replies: 0
    Last Post: 08-01-2011, 09:00 AM
  5. Variable Output Based on Another Cell
    By NickJW in forum Excel General
    Replies: 12
    Last Post: 12-30-2010, 08:28 AM
  6. VBA Output based on what's typed into Cell.
    By samhale in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-09-2008, 05:38 PM
  7. Output list based on value in a cell
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-23-2006, 10:30 AM

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