Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Struggling with Formula (Excel 2002)

    Hi

    I am struggling to create the formula below.

    IF B8 less or equal to 650, = "350ml per day"
    IF B8 between 651 and 900, = "550ml per day"
    IF B8 between 901 and 1300, = "650ml per day"
    IF B8 between 1301 and 1750, = "1000ml per day"
    IF B8 1751 or above, dosage = "1200ml per day"


    =IF(B8<=650,"350ml per day,if(or(b8>650,b8<901),"550ml per day",if(or(b8>901,b8<1301),"650ml per day",if(or(b8>1300,b8<1750),"1000ml per day",if(b8>1750,"1200ml per day"))))),"")

    I would be most grateful for some help.
    Braddy
    If you are a fool at forty, you will always be a fool

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Struggling with Formula (Excel 2002)

    Excel will return the first value that meets the criteria, so you can simplify a bit. And you can take the repeated "ml per day" out of the IF.

    =IF(B8<=650,350,IF(B8<=900,550,IF(B8<=1300,650,IF( B8<=1750,1000,1200))))&"ml per day"

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Struggling with Formula (Excel 2002)

    Unless you really need it to be text, I prefer in my work that it stays the number which allows you to continue using it in calculations. If you want the units in the same cell you can use custom format:

    Format - cells - custom:
    #,##0ml per day

    Steve
    PS I also prefer the standard abbreviation of mL not ml, but that is the chemist in me. I actually would use " mL/day" to make it shorter

  4. #4
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Struggling with Formula (Excel 2002)

    Hi Hans

    Thanks for the reply, nicely simplified, and thanks to Steve for his input aswell

    Most Grateful

    Braddy
    If you are a fool at forty, you will always be a fool

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •