+ Reply to Thread
Results 1 to 7 of 7

BMI Classification Using IF Formulae

  1. #1
    Registered User
    Join Date
    09-22-2016
    Location
    Australia
    MS-Off Ver
    Office 2013
    Posts
    3

    BMI Classification Using IF Formulae

    Hello, everyone.

    I'm having a bit of trouble with using the logic in Excel; I've never really used the program before in the past.

    I have a set of values in the I column for patient BMIs and I want to give a sort of classification to them so I can represent my data on a pivot table. For the example I have (I2), the patient's BMI is within the healthy range but, since it's over the value 18.5, it just comes up as obese. I can see how the formula would imply that I wanted that value but I have no idea as to how to fix it.

    My formula is as follows,

    =IF(I2<18.5,"Underweight",IF(18.5<=I2<25,"Healthy",IF(25<=I2<30,"Overweight","Obese")))

    Thanks for your help!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: BMI Classification Using IF Formulae

    18.5<=I2<25

    is math notation but not valid syntax in Excel. Try this:

    =IF(I2<18.5,"Underweight",IF(AND(18.5<=I2, I2<25),"Healthy",IF(AND(25<=I2, I2<30),"Overweight","Obese")))
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,256

    Re: BMI Classification Using IF Formulae

    Try

    =IF(I2<18.5,"Underweight",IF(I2<25,"Healthy",IF(i2<30,"Overweight","Obese")))

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: BMI Classification Using IF Formulae

    Need to use AND functions...


    =IF(I2<18.5,"Underweight",IF(AND(18.5<=I2,I2<25),"Healthy",IF(AND(25<=I2,I2<30),"Overweight","Obese")))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  5. #5
    Registered User
    Join Date
    09-22-2016
    Location
    Australia
    MS-Off Ver
    Office 2013
    Posts
    3

    Re: BMI Classification Using IF Formulae

    Thanks for the quick response! Unfortunately, both of those gave me a false.

  6. #6
    Registered User
    Join Date
    09-22-2016
    Location
    Australia
    MS-Off Ver
    Office 2013
    Posts
    3

    Re: BMI Classification Using IF Formulae

    Oh, nevermind! I just tried again and it worked. Thank you all very much for your help. Odd that it didn't work the first time, though. Sorry for the trouble.

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,256

    Re: BMI Classification Using IF Formulae

    See attached
    Attached Files Attached Files

+ 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] Classification model
    By Adamlee in forum Excel General
    Replies: 4
    Last Post: 01-27-2016, 05:42 AM
  2. Classification of a cell
    By joaobabosilva in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-08-2013, 01:36 PM
  3. automated classification
    By Bax in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-21-2013, 09:13 AM
  4. date classification
    By cyberuser in forum Excel General
    Replies: 5
    Last Post: 12-22-2010, 04:42 PM
  5. Averages and Classification
    By todd J in AZ in forum Excel General
    Replies: 1
    Last Post: 11-17-2009, 01:53 AM
  6. Calculations & Classification help
    By gwenturpin in forum Excel General
    Replies: 0
    Last Post: 04-20-2007, 06:25 AM
  7. Sum by row classification/type
    By djarcadian in forum Excel General
    Replies: 2
    Last Post: 01-27-2005, 07:11 PM

Tags for this Thread

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