How do I set a data cap in a SUMIF function?












1















I want to create a single formula that combines the two formulas together:
=IF(E1>500,500,E1)

and
=SUMIF(A1:A10,"Y",E1:E10)



Basically, I want to sum items from columns E1 to E10 when the value of a row in column A is equal to "Y".



I want to set a data cap wherein if one of the values to be added is greater than 500 (for example: 589), then the formula will read add the cell value as 500 instead of 589.

If the value is 500 or less, we are adding the value as is.



How do I this?










share|improve this question





























    1















    I want to create a single formula that combines the two formulas together:
    =IF(E1>500,500,E1)

    and
    =SUMIF(A1:A10,"Y",E1:E10)



    Basically, I want to sum items from columns E1 to E10 when the value of a row in column A is equal to "Y".



    I want to set a data cap wherein if one of the values to be added is greater than 500 (for example: 589), then the formula will read add the cell value as 500 instead of 589.

    If the value is 500 or less, we are adding the value as is.



    How do I this?










    share|improve this question



























      1












      1








      1








      I want to create a single formula that combines the two formulas together:
      =IF(E1>500,500,E1)

      and
      =SUMIF(A1:A10,"Y",E1:E10)



      Basically, I want to sum items from columns E1 to E10 when the value of a row in column A is equal to "Y".



      I want to set a data cap wherein if one of the values to be added is greater than 500 (for example: 589), then the formula will read add the cell value as 500 instead of 589.

      If the value is 500 or less, we are adding the value as is.



      How do I this?










      share|improve this question
















      I want to create a single formula that combines the two formulas together:
      =IF(E1>500,500,E1)

      and
      =SUMIF(A1:A10,"Y",E1:E10)



      Basically, I want to sum items from columns E1 to E10 when the value of a row in column A is equal to "Y".



      I want to set a data cap wherein if one of the values to be added is greater than 500 (for example: 589), then the formula will read add the cell value as 500 instead of 589.

      If the value is 500 or less, we are adding the value as is.



      How do I this?







      microsoft-excel worksheet-function microsoft-excel-2010 microsoft-excel-2007






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 7 at 8:48









      Máté Juhász

      14.4k63352




      14.4k63352










      asked Jan 7 at 8:16









      TrixieTrixie

      112




      112






















          1 Answer
          1






          active

          oldest

          votes


















          2














          You may follow different approaches here:




          1. use an array formula:
            =SUM((A1:A10="y")*IF(E1:E10>500,500,E1:E10))

            this is an array formula, so after typing it you need to finish by pressing CTRL+SHIFT+ENTER

          2. split your task and cover different scenarios with different functions:
            =SUMIFS(E1:E10,A1:A10,"y",E1:E10,"<500")+COUNTIFS(A1:A10,"y",E1:E10,">=500")*500

            Here SUMIFS calculates only sum of entries below 500, and COUNTIFS counts entries above 500


          enter image description here






          share|improve this answer



















          • 1





            Wow, thank you so much! This is exactly what I need :)

            – Trixie
            Jan 7 at 9:30











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1391398%2fhow-do-i-set-a-data-cap-in-a-sumif-function%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          You may follow different approaches here:




          1. use an array formula:
            =SUM((A1:A10="y")*IF(E1:E10>500,500,E1:E10))

            this is an array formula, so after typing it you need to finish by pressing CTRL+SHIFT+ENTER

          2. split your task and cover different scenarios with different functions:
            =SUMIFS(E1:E10,A1:A10,"y",E1:E10,"<500")+COUNTIFS(A1:A10,"y",E1:E10,">=500")*500

            Here SUMIFS calculates only sum of entries below 500, and COUNTIFS counts entries above 500


          enter image description here






          share|improve this answer



















          • 1





            Wow, thank you so much! This is exactly what I need :)

            – Trixie
            Jan 7 at 9:30
















          2














          You may follow different approaches here:




          1. use an array formula:
            =SUM((A1:A10="y")*IF(E1:E10>500,500,E1:E10))

            this is an array formula, so after typing it you need to finish by pressing CTRL+SHIFT+ENTER

          2. split your task and cover different scenarios with different functions:
            =SUMIFS(E1:E10,A1:A10,"y",E1:E10,"<500")+COUNTIFS(A1:A10,"y",E1:E10,">=500")*500

            Here SUMIFS calculates only sum of entries below 500, and COUNTIFS counts entries above 500


          enter image description here






          share|improve this answer



















          • 1





            Wow, thank you so much! This is exactly what I need :)

            – Trixie
            Jan 7 at 9:30














          2












          2








          2







          You may follow different approaches here:




          1. use an array formula:
            =SUM((A1:A10="y")*IF(E1:E10>500,500,E1:E10))

            this is an array formula, so after typing it you need to finish by pressing CTRL+SHIFT+ENTER

          2. split your task and cover different scenarios with different functions:
            =SUMIFS(E1:E10,A1:A10,"y",E1:E10,"<500")+COUNTIFS(A1:A10,"y",E1:E10,">=500")*500

            Here SUMIFS calculates only sum of entries below 500, and COUNTIFS counts entries above 500


          enter image description here






          share|improve this answer













          You may follow different approaches here:




          1. use an array formula:
            =SUM((A1:A10="y")*IF(E1:E10>500,500,E1:E10))

            this is an array formula, so after typing it you need to finish by pressing CTRL+SHIFT+ENTER

          2. split your task and cover different scenarios with different functions:
            =SUMIFS(E1:E10,A1:A10,"y",E1:E10,"<500")+COUNTIFS(A1:A10,"y",E1:E10,">=500")*500

            Here SUMIFS calculates only sum of entries below 500, and COUNTIFS counts entries above 500


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 7 at 8:47









          Máté JuhászMáté Juhász

          14.4k63352




          14.4k63352








          • 1





            Wow, thank you so much! This is exactly what I need :)

            – Trixie
            Jan 7 at 9:30














          • 1





            Wow, thank you so much! This is exactly what I need :)

            – Trixie
            Jan 7 at 9:30








          1




          1





          Wow, thank you so much! This is exactly what I need :)

          – Trixie
          Jan 7 at 9:30





          Wow, thank you so much! This is exactly what I need :)

          – Trixie
          Jan 7 at 9:30


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1391398%2fhow-do-i-set-a-data-cap-in-a-sumif-function%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

          Alcedinidae

          Origin of the phrase “under your belt”?