+ Reply to Thread
Results 1 to 3 of 3

IF Statement returns either Value error or False

  1. #1
    Registered User
    Join Date
    04-06-2009
    Location
    Austin, TX
    MS-Off Ver
    Excel 2007
    Posts
    34

    IF Statement returns either Value error or False

    if Statement A: =IF(M4>$B$17,0,LOOKUP(M4,$AA$20:$AB$29)*$B$15/12) works very well

    if Statement B: =IF(M4>$B$17,0,LOOKUP(M4,$AA$36:$AB$44)*$B$15/12) works well too

    now I am trying to say

    =IF('Input Page'!B36="yes",(IF(M4>$B$17,0,LOOKUP(M4,$AA$36:$AB$44)*$B$15/12),(IF(M4>$B$17,0,LOOKUP(M4,$AA$20:$AB$29)*$B$15/12))))

    Basically, if B36 is yes, use If Statement B, otherwise IF Statement A. If I write Yes, I get a "Value" error, if I change the yes to 1, I get a FALSE error.

    What am I doing wrong?
    Thanks
    Last edited by katja328; 01-07-2010 at 02:48 PM.

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

    Re: IF Statement returns either Value error or False

    Maybe should be?

    =IF(M4>$B$17,0,IF('Input Page'!B36="yes",LOOKUP(M4,$AA$36:$AB$44)*$B$15/12,LOOKUP(M4,$AA$20:$AB$29)*$B$15/12))
    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.

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

    Re: IF Statement returns either Value error or False

    or simplified:

    =IF(M4>$B$17,0,$B$15/12*LOOKUP(M4,IF('Input Page'!B36="yes",$AA$36:$AB$44,$AA$20:$AB$29)))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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