+ Reply to Thread
Results 1 to 7 of 7

Array inside the SUMIF problem

  1. #1
    Registered User
    Join Date
    12-12-2012
    Location
    Dammam, Saudi Arabia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Array inside the SUMIF problem

    Good day

    As you can find in formula for the highlighted rows in yellow in the attached file, I am trying to sum specific cells in the column if the value of other cells are valid.

    I tried to use SUMIF and/or SUMIFS but I cannot make it work. I am thinking of using array inside the SUMIF but unfortunately it not working with me either. Currently I am using the following formula and it is fine but the problem would be if I have 100 packages. The formula would be long and the mistakes would be easily happened.

    =IF(D$18="Received",D$16)+IF(D$35="Received",D$33)+IF(D$52="Received",D$50)

    I believe that there is a butter solution. Do you have any suggestion?

    Best regards
    Attached Files Attached Files

  2. #2
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Array inside the SUMIF problem

    Hi

    Sumifs will not accept array's. Look into SUMPRODUCT & SUMIFS
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

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

    Re: Array inside the SUMIF problem

    Try this..

    In D61
    Please Login or Register  to view this content.
    In D62
    Please Login or Register  to view this content.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Array inside the SUMIF problem

    hi AHB10, welcome to the forum. i'll just share the SUMPRODUCT since Ace_XL have shared the SUMIFS:
    =SUMPRODUCT(($B$18:$B$52="Status : Received / Outstanding")*(D$18:D$52="Received"),D$16:D$50)

    basically, our intention is to make the "Net Amount Invoiced" in line with the "Status : Received / Outstanding". so you'll notice our range for Column B & D is intentionally different

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  5. #5
    Registered User
    Join Date
    12-12-2012
    Location
    Dammam, Saudi Arabia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Array inside the SUMIF problem

    Dears,

    Thank you for your contribution.

    I’ve noticed Ace_XL answer and i was asking myself why until it is explained by benishiryo. It was a trick I never thought about but I am still wondering about if any rows inserted in between for one package but not in the others, is this formula going to be affected although I’ve tried and it is not. Is it possible that both criteria would not be in line with each other using these formulas??

    Thanks and best regards

  6. #6
    Registered User
    Join Date
    12-12-2012
    Location
    Dammam, Saudi Arabia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Array inside the SUMIF problem

    Dears,

    Could any body help on this ??

    best regards

  7. #7
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Array inside the SUMIF problem

    it is safe as long as you include those relevant columns that are in the formula when you insert a row. safest way is of course to insert an entire row.

+ 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