+ Reply to Thread
Results 1 to 4 of 4

Nested If and in array formula not working

  1. #1
    Forum Contributor
    Join Date
    11-15-2008
    Location
    Arizona
    MS-Off Ver
    Excel 2013
    Posts
    179

    Nested If and in array formula not working

    Here is the array formula that is not working: {=SUM(IF((AND(MONTH(A9:A84)=1,B9:B84="Income")), E9:E84,0))}

    I am trying to calculate the gross for January.

    So it looks at the date (column A) and searches for January, then looks in the type (column B) and searches for income. If that row has both January and income, then I want it to add up the amount (column E).

    Since this is the gross earnings and not the net, it needs to ignore the "expense" type charges and the "taxes" type charges, and only add the amounts that are income in January.

    Right now, it is just returning $0.00 even though there is income for January. I am sure I made a simple error in the formula somewhere, but I can't spot it. ANy ideas?

    My array formula to calculate the net is working: {=SUM(IF(MONTH(A9:A84)=1, E9:E84,0))}

    This adds all amounts for January (income, expense, tax). It adds everything that is only listed as January. And this is working. It returns the correct net amount.
    Last edited by dsrt16; 05-24-2018 at 07:28 PM. Reason: Solved

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,918

    Re: Nested If and in array formula not working

    The array formula does not support and (), or ().
    change and () to *, or() to +

    =SUM(IF((MONTH(A9:A84)=1)*(B9:B84="Income"), E9:E84,0))

  3. #3
    Forum Contributor
    Join Date
    11-15-2008
    Location
    Arizona
    MS-Off Ver
    Excel 2013
    Posts
    179

    Re: Nested If and in array formula not working

    That worked. Thanks!

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Nested If and in array formula not working

    Or use regular formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Is it possible a nested array within an array formula?
    By Zapillo in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 09-19-2016, 09:29 PM
  2. [SOLVED] nested 'if' formula not working
    By couscraig in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-26-2016, 01:07 PM
  3. [SOLVED] Formula with IF and nested AND not working
    By Nights in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-21-2015, 04:28 PM
  4. IF formula nested not working
    By certain_death in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-01-2014, 05:36 PM
  5. IF( AND( NESTED formula is not working
    By genetist in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-01-2014, 01:54 AM
  6. Large of a Date Array only working with nested IF, not AND
    By Matt_ in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-08-2013, 09:21 PM
  7. Array Formula with nested IFs
    By JonPugh in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-19-2007, 07:33 AM

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