+ Reply to Thread
Results 1 to 5 of 5

= if when dealing with 10 different parameters

  1. #1
    Registered User
    Join Date
    06-07-2010
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    47

    = if when dealing with 10 different parameters

    I cant seem to figure this out.....I am trying to get cell d2 to calculate the following: (Cell b2 is a temperature entry) If cell b2 is between 0-5, then i want d2 to populate the number in cell j2, if b2 is in between 5-10, then I want d2 to populate the number in j3. This goes on for 10 different possibilities from j2 thru j12.

    this by itself works: =IF(AND(B2>=0,B2<5),J2,0)

    this doesn't work: =IF(AND(B2>=0,B2<5),J2,0) =IF(AND(B2>=5,B2<10),J3,0)

    I am sure the solution is simple. However I am just brain cramping trying to figure this out

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: = if when dealing with 10 different parameters

    You can nest the IFs like this
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    But I suspect a lookup would be a better idea rather than nesting 10 IFs.
    Exactly which kind of lookup you use will depend on your data. Maybe post a sample workbook if you'd like help with that.

    BSB

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,816

    Re: = if when dealing with 10 different parameters

    Rather than have multiple nested IF statements, you can use this in D2:

    =INDEX($J$2:$J$12,MATCH(B2,{0,5,10,15,20,25,30,35,40,45,50}))

    Hope this helps.

    Pete

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,924

    Re: = if when dealing with 10 different parameters

    Try ...

    =IF(AND(B2>=0,B2<5),J2,IF(AND(B2>=5,B2<10),J3,0))

  5. #5
    Registered User
    Join Date
    06-07-2010
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    47

    Re: = if when dealing with 10 different parameters

    Winner winner chicken dinner! Thank you for your help Pete it works perfectly!!

+ 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] dealing with #NUM! error
    By jrtaylor in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-19-2016, 07:43 PM
  2. [SOLVED] dealing with #N/A
    By Trebor777 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-08-2016, 10:04 AM
  3. Dealing with dates in VBA
    By j_Southern in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-29-2012, 07:19 AM
  4. Dealing with N/A in Vlookup via a UDF
    By tom.hogan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-27-2011, 09:06 PM
  5. Dealing with #N/A
    By jpnyc in forum Excel General
    Replies: 2
    Last Post: 08-10-2010, 12:41 PM
  6. Dealing with #DIV/0!
    By Dean England in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-28-2006, 12:26 PM
  7. dealing with a projection
    By Larry Holt in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 02-15-2006, 12:10 PM

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