How do I set a data cap in a SUMIF function?
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
add a comment |
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
add a comment |
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
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
microsoft-excel worksheet-function microsoft-excel-2010 microsoft-excel-2007
edited Jan 7 at 8:48
Máté Juhász
14.4k63352
14.4k63352
asked Jan 7 at 8:16
TrixieTrixie
112
112
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You may follow different approaches here:
- 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 - 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
HereSUMIFS
calculates only sum of entries below 500, andCOUNTIFS
counts entries above 500
1
Wow, thank you so much! This is exactly what I need :)
– Trixie
Jan 7 at 9:30
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
You may follow different approaches here:
- 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 - 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
HereSUMIFS
calculates only sum of entries below 500, andCOUNTIFS
counts entries above 500
1
Wow, thank you so much! This is exactly what I need :)
– Trixie
Jan 7 at 9:30
add a comment |
You may follow different approaches here:
- 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 - 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
HereSUMIFS
calculates only sum of entries below 500, andCOUNTIFS
counts entries above 500
1
Wow, thank you so much! This is exactly what I need :)
– Trixie
Jan 7 at 9:30
add a comment |
You may follow different approaches here:
- 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 - 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
HereSUMIFS
calculates only sum of entries below 500, andCOUNTIFS
counts entries above 500
You may follow different approaches here:
- 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 - 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
HereSUMIFS
calculates only sum of entries below 500, andCOUNTIFS
counts entries above 500
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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