+ Reply to Thread
Results 1 to 7 of 7

SUMIFS with Arrays

  1. #1
    Registered User
    Join Date
    08-02-2016
    Location
    Milwaukee, WI
    MS-Off Ver
    MS Office 365 Version 2307
    Posts
    7

    SUMIFS with Arrays

    The formulas below are running correctly, but I know there is a way to clean these up to more efficient calculations.

    you will see below that I am looking for a sum of an amount in column M, with 5 OR-variables in column C and 45 OR-variables in column A. There are also ranges of variables in column C that may help in cleaning this formula up, in which I am looking for values from 320-339,350-360,401-403,610-618,761 and 921.

    ANY help you can provide would be much appreciated. thanks!


    +SUM(SUMIFS(M:M,C:C,"*76030",A:A,{"320*","321*","322*","323*","324*","325*","326*","327*","328*","329*","330*","331*","332*","333*","334*","335*","336*","337*","338*","339*","350*","351*","352*","353*","354*","355*","356*","357*","358*","359*","360*","401*","402*","403*","610*","611*","612*","613*","614*","615*","616*","617*","618*","761*","921*"}),
    SUMIFS(M:M,C:C,"*76031",A:A,{"320*","321*","322*","323*","324*","325*","326*","327*","328*","329*","330*","331*","332*","333*","334*","335*","336*","337*","338*","339*","350*","351*","352*","353*","354*","355*","356*","357*","358*","359*","360*","401*","402*","403*","610*","611*","612*","613*","614*","615*","616*","617*","618*","761*","921*"}),
    SUMIFS(M:M,C:C,"*76032",A:A,{"320*","321*","322*","323*","324*","325*","326*","327*","328*","329*","330*","331*","332*","333*","334*","335*","336*","337*","338*","339*","350*","351*","352*","353*","354*","355*","356*","357*","358*","359*","360*","401*","402*","403*","610*","611*","612*","613*","614*","615*","616*","617*","618*","761*","921*"}),
    SUMIFS(M:M,C:C,"*76033",A:A,{"320*","321*","322*","323*","324*","325*","326*","327*","328*","329*","330*","331*","332*","333*","334*","335*","336*","337*","338*","339*","350*","351*","352*","353*","354*","355*","356*","357*","358*","359*","360*","401*","402*","403*","610*","611*","612*","613*","614*","615*","616*","617*","618*","761*","921*"}),
    SUMIFS(M:M,C:C,"*76034",A:A,{"320*","321*","322*","323*","324*","325*","326*","327*","328*","329*","330*","331*","332*","333*","334*","335*","336*","337*","338*","339*","350*","351*","352*","353*","354*","355*","356*","357*","358*","359*","360*","401*","402*","403*","610*","611*","612*","613*","614*","615*","616*","617*","618*","761*","921*"}))

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SUMIFS with Arrays

    Try

    =SUM(SUMIFS(M:M,C:C,{ "*76030";"*76031";"*76032";"*76033";"*76034" },A:A,{"320*","321*","322*","323*","324*","325*","326*","327*","328*","329*","330*","331*","332*","333*","334*","335*","336*","337*","338*","339*","350*","351*","352*","353*","354*","355*","356*","357*","358*","359*","360*","401*","402*","403*","610*","611*","612*","613*","614*","615*","616*","617*","618*","761*","921*"}))

  3. #3
    Registered User
    Join Date
    08-02-2016
    Location
    Milwaukee, WI
    MS-Off Ver
    MS Office 365 Version 2307
    Posts
    7

    Re: SUMIFS with Arrays

    Quote Originally Posted by Jonmo1 View Post
    Try

    =SUM(SUMIFS(M:M,C:C,{ "*76030";"*76031";"*76032";"*76033";"*76034" },A:A,{"320*","321*","322*","323*","324*","325*","326*","327*","328*","329*","330*","331*","332*","333*","334*","335*","336*","337*","338*","339*","350*","351*","352*","353*","354*","355*","356*","357*","358*","359*","360*","401*","402*","403*","610*","611*","612*","613*","614*","615*","616*","617*","618*","761*","921*"}))
    is there a way to combine the second array into groupings (ie. 320-339,350-360,401-403,610-618,761 and 921)?

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SUMIFS with Arrays

    Not that I'm aware of.

    Are you looking for 'efficiency' or 'simplicity' ?
    The do not necessarily go hand in hand.

    Can you post a sample workbook?

  5. #5
    Registered User
    Join Date
    08-02-2016
    Location
    Milwaukee, WI
    MS-Off Ver
    MS Office 365 Version 2307
    Posts
    7

    Re: SUMIFS with Arrays

    Quote Originally Posted by Jonmo1 View Post
    Not that I'm aware of.

    Are you looking for 'efficiency' or 'simplicity' ?
    The do not necessarily go hand in hand.

    Can you post a sample workbook?
    it is a very large workbook, so I would be looking for efficiency due to calculation time.

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SUMIFS with Arrays

    I can't imagine it getting too much more efficient than it already is.
    It's just alot of comparisons to make, no matter how you slice it.

    Perhaps a helper column with some sort of lookup?


    Can you attach a small sample book, with only 20 or so rows of relevant data?

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SUMIFS with Arrays

    I'm thinking something like this in a helper column.

    Say column B is
    =IFERROR(LOOKUP(A1,{0,320,340,350,361,401,404,610,619,761,762,921,922},{0,1,0,1,0,1,0,1,0,1,0,1,0}),0)

    Then use that helper column as a criteria of 1.
    =SUM(SUMIFS(M:M,C:C,{ "*76030";"*76031";"*76032";"*76033";"*76034" },B:B,1)

+ 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. [SOLVED] SUMIFS in VBA using arrays
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-07-2016, 02:08 PM
  2. [SOLVED] SUMIFS using arrays
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-05-2015, 05:51 AM
  3. [SOLVED] Creating arrays to use in SUMIFS
    By cmcgath in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-23-2014, 01:53 PM
  4. [SOLVED] Creating arrays to use in SUMIFS
    By cmcgath in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-22-2014, 12:19 PM
  5. [SOLVED] Using Name Arrays as Criteria in SumProduct/SumIfs
    By stepscot in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-16-2014, 10:24 AM
  6. SUMIFS using arrays as criteria
    By Ricardo Mass in forum Excel General
    Replies: 5
    Last Post: 02-28-2014, 12:36 PM
  7. SUMIFS vs. arrays
    By djapigo in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-30-2012, 01:39 AM

Tags for this Thread

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