+ Reply to Thread
Results 1 to 3 of 3

Nesting IF's and AND's...

  1. #1
    Forum Contributor
    Join Date
    06-21-2006
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2007
    Posts
    108

    Nesting IF's and AND's...

    Hi. I have 3 formula's which I would like merging into one?

    =IF(AND(C3<$B$1,C3>1/1/1,D3=""),"N","")

    =IF(AND(C3>$B$1,D3=""),"M","")

    =IF(AND(C3>1/1/1,D3>1/1/1),"Y","")

    I would like all these as one formula in cell E3?

    I've had a try myself but am not very good at nesting functions....

    Thanks in advance.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    The easiest way to nest the functions is to replace each "" in the what_to_do_if _false parts of the IF() functions with the next IF() statement.

    e.g.

    =IF(AND(C3<$B$1,C3>1/1/1,D3=""),"N",IF(AND(C3>$B$1,D3=""),"M",IF(AND(C3>1/1/1,D3>1/1/1),"Y","")))

    Most of the time, you can further consolidate the functions a bit to make it more efficient...

    edit: not sure what the 1/1/1 is for though...
    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 Contributor
    Join Date
    06-21-2006
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2007
    Posts
    108
    Ah!! I knew it would be something relatively simple.... Oh the 1/1/1 is basically cos the formula refers to dates. It's the only way I could think to specify that there was a date in the cell(s).
    There's probably an easier way to say that.... but it works, so...

    Thanks!!!!

+ 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