+ Reply to Thread
Results 1 to 4 of 4

IF formula - last argument not returning correct value

  1. #1
    Registered User
    Join Date
    05-21-2012
    Location
    Monterey, California
    MS-Off Ver
    Excel 2010
    Posts
    5

    IF formula - last argument not returning correct value

    The last argument of my formula below is returning a 0 when I would expect a 1. No matter what I try,
    won't give me a 1. Prob something simple I'm overlooking..any help would be greatly appreciated.

    =IF(H3>=5,4,(IF(AND(H3>=3,H3<5),3,(IF(AND(H3>=2,H3<3),2,(IF(AND(H3>=1,H3<2,),1,)))))))
    Attached Files Attached Files

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: IF formula - last argument not returning correct value

    How about this instead...

    =LOOKUP(H3,{1,2,3,5},{1,2,3,4})

    ...but if you want to keep what you already have, a few commas out of place...

    =IF(H3>=5,4,(IF(AND(H3>=3,H3<5),3,(IF(AND(H3>=2,H3<3),2,(IF(AND(H3>=1,H3<2),1)))))))
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    11-14-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: IF formula - last argument not returning correct value

    Hi,
    There is an additional comma after <2 in the last argument. Removing it, the formula works fine.
    =IF(H3>=5,4,(IF(AND(H3>=3,H3<5),3,(IF(AND(H3>=2,H3<3),2,(IF(AND(H3>=1,H3<2),1,0)))))))

  4. #4
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: IF formula - last argument not returning correct value

    Another way..

    =IF(H3>=5,4,IF(H3>=3,3,H3))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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