+ Reply to Thread
Results 1 to 5 of 5

How to condense my extra long SUMIF formula?

  1. #1
    Registered User
    Join Date
    04-29-2010
    Location
    McLean, VA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    87

    How to condense my extra long SUMIF formula?

    All,

    I am trying to find a way to condense this formula:

    =SUMIF(CSSummary!$2:$2,$C6,CSSummary!$15:$15)+SUMIF(CSSummary!$2:$2,$C6,CSSummary!$24:$24)+SUMIF(CSSummary!$2:$2,$C6,CSSummary!$35:$35)+SUMIF(CSSummary!$2:$2,$C6,CSSummary!$62:$62)

    I have used the SUMPRODUCT function to capture multiple rows before but cannot find an answer on the net or remember how to do it.

    My question is, how can I condense my formula so that I don't have to continue adding another "sumif" statement to the formula for each new row I want to capture?

    Here is an easier way to look at the formula I have placed above:
    SUMIF(CSSummary!$2:$2,$C6,CSSummary!$15:$15)
    +SUMIF(CSSummary!$2:$2,$C6,CSSummary!$24:$24)
    +SUMIF(CSSummary!$2:$2,$C6,CSSummary!$35:$35)
    +SUMIF(CSSummary!$2:$2,$C6,CSSummary!$62:$62)

    Any help is greatly appreciated.
    The Exceller
    If I helped you, please add to my reputation by clicking on the scale by my name in this post.

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: How to condense my extra long SUMIF formula?

    Please Login or Register  to view this content.
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

  3. #3
    Registered User
    Join Date
    04-29-2010
    Location
    McLean, VA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    87

    Re: How to condense my extra long SUMIF formula?

    Thanks ben_hensel.

    For some reason this doesn't work for me.
    The plus operator doesn't seem to work for me to add the separate rows. I tried using a comma instead and I get some astronomical number that doesn't make sense for my data? Any thoughts?

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,114

    Re: How to condense my extra long SUMIF formula?

    Try it this way:
    Please Login or Register  to view this content.
    Let me know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: How to condense my extra long SUMIF formula?

    Quote Originally Posted by The Exceller View Post
    For some reason this doesn't work for me.
    The plus operator doesn't seem to work for me to add the separate rows. I tried using a comma instead and I get some astronomical number that doesn't make sense for my data? Any thoughts?
    (1) Doesn't work how? Throwing an error code? Or just not an expected value?
    If possible post the spreadsheet so I can diagnose.

    (2)...well the function is called SUMPRODUCT, that means it takes the SUM of the PRODUCT at each index of the arrays. So it's a huge number because it's taking the product instead of the sum across the rows.

    Anyway, JeteMc has a sightly different formulation that should (also) work.

+ 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. Sumif with 2 extra criterias in Excel 2003
    By AleloupMadrid in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-18-2014, 06:32 AM
  2. [SOLVED] =IF and =SUMIF formulas creating long long long data processing times.
    By comp in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 03-26-2014, 02:59 PM
  3. The runtime for my code I wrote takes too long, is there a way tocan you condense?
    By dnice0123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2014, 03:33 AM
  4. Sumproct, sumif indirect formula long run time.
    By avk in forum Excel General
    Replies: 4
    Last Post: 12-29-2012, 04:10 AM
  5. Replies: 8
    Last Post: 08-27-2012, 04:37 PM
  6. extra hours adding money for each extra hour worked FORMULA
    By cynthiamcastro in forum Excel General
    Replies: 3
    Last Post: 06-18-2012, 11:27 AM
  7. Replies: 2
    Last Post: 12-08-2009, 03:41 PM

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