+ Reply to Thread
Results 1 to 4 of 4

Multiple conditions in nested IF statements

  1. #1
    Registered User
    Join Date
    04-09-2009
    Location
    Dorset, England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Multiple conditions in nested IF statements

    I've been using nested IF statements, with success for a while, but now I'm into my fourth nested statement I'm starting to get some problems.

    =IF($P15>0,SUM(IF(APR09!$M$2:$M$500=Department!$M$1,IF(APR09!$B$2:$B$500=$Q$6,IF((AND(APR09!$G$2:$G$500<>Department!$N$29,APR09!$G$2:$G$500<>Department!$N$30)),1,0),$N$2))))

    Is what I've come up with so far. However, this returns 0, even though there are 3 items which should resolve the criteria.

    The main problem is here: IF((AND(APR09!$G$2:$G$500<>Department!$N$29,APR09!$G$2:$G$500<>Department!$N$30))


    Where I am trying to make the sum increase by 1 if the cell from the row in question, having made it through the first 3 IF statements is not equal to either of those two cells (a range would be better) then the Sum needs to be increased by 1.

    Is there any way of doing this?

    Thanks
    Last edited by havfunonline2; 04-09-2009 at 06:05 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Multiple conditions in nested IF statements

    Might be better to switch to a Sumproduct

    Please Login or Register  to view this content.
    (if you're using XL2007 you can use COUNTIFS but I am guessing your're not)

  3. #3
    Registered User
    Join Date
    04-09-2009
    Location
    Dorset, England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Multiple conditions in nested IF statements

    I don't know what the hell any of that is, but it works, cheers!

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Multiple conditions in nested IF statements

    Hi,
    you'll find more info on the SUMPRODUCT function at this place

+ 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