Consulting

Results 1 to 4 of 4

Thread: Solved: Recieving a "FALSE" in If function. Need Help!

  1. #1
    VBAX Newbie
    Joined
    Jun 2007
    Location
    Brighton, TN
    Posts
    2
    Location

    Solved: Recieving a "FALSE" in If function. Need Help!

    The following function, for some reason, will not work with certain numbers:

    =IF(AND(Totals!S5>=1,Totals!S5<=1.67),"Minor",IF(AND(Totals!S5>=1.68,Totals !S5<=2.35),"Moderate",IF(AND(Totals!S5>=2.36,Totals!S5<=3),"Severe")))

    This is a simple function but when the value in "Totals!S5" is 1.67 or 2.35 it returns a FALSE in the cell. For the life of me I cannot figure out why. Is there anyone who could help me with this. (I know the function may be set up really bad and my lack of knowledge may be the problem). There is never a time when the value should be false because the numbers in "Totals!S5" are always between 1 and 3.

    thanks

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    I think you are returning values rounded down/up eg 1.672.
    try
    =IF(AND(Totals!S5>=1,Totals!S5<=1.675),"Minor",IF(AND(Totals!S5>1.675,Total s!S5<=2.355),"Moderate",IF(AND(Totals!S5>2.355,Totals!S5<=3),"Severe")))
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    VBAX Newbie
    Joined
    Jun 2007
    Location
    Brighton, TN
    Posts
    2
    Location
    Thanks that did the trick.

  4. #4
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    Welcome to the Board!

    Don't forget to mark this thread as solved (click on "Thread Tools" at the top of the page).

Posting Permissions

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