Excel - Count Each time yesterday's date and a second criteria appear on a different sheet
Hello and thanks in advance for the response.
I have an excel workbook in which Sheet 1 is a data table and Sheet 2 will contain a number of formulas that pull from Sheet 1.
Specifically, I have two columns in Sheet 1, one with dates and one with letters (A-D) and I want to count each time the date column is yesterday's date and the letter is A. NOTE: This needs to be a formula not VBA.
Col A: Date -- Col B: Letter
Row 1: 11/13/2018--A
Row 2: 11/11/2018--B
Row 3: 11/02/2018--A
Row 4: 11/12/2018--B
Row 5: 11/13/2018--A
Row 6: 11/13/2018--A
Row 7: 11/13/2018--C
Row 8: 11/13/2018--C
In this case the formula in Sheet 2 should display a count of 3 since yesterday's date is 11/13/2018 and has the letter A 3 times.
Thank you!!
excel formula
add a comment |
Hello and thanks in advance for the response.
I have an excel workbook in which Sheet 1 is a data table and Sheet 2 will contain a number of formulas that pull from Sheet 1.
Specifically, I have two columns in Sheet 1, one with dates and one with letters (A-D) and I want to count each time the date column is yesterday's date and the letter is A. NOTE: This needs to be a formula not VBA.
Col A: Date -- Col B: Letter
Row 1: 11/13/2018--A
Row 2: 11/11/2018--B
Row 3: 11/02/2018--A
Row 4: 11/12/2018--B
Row 5: 11/13/2018--A
Row 6: 11/13/2018--A
Row 7: 11/13/2018--C
Row 8: 11/13/2018--C
In this case the formula in Sheet 2 should display a count of 3 since yesterday's date is 11/13/2018 and has the letter A 3 times.
Thank you!!
excel formula
add a comment |
Hello and thanks in advance for the response.
I have an excel workbook in which Sheet 1 is a data table and Sheet 2 will contain a number of formulas that pull from Sheet 1.
Specifically, I have two columns in Sheet 1, one with dates and one with letters (A-D) and I want to count each time the date column is yesterday's date and the letter is A. NOTE: This needs to be a formula not VBA.
Col A: Date -- Col B: Letter
Row 1: 11/13/2018--A
Row 2: 11/11/2018--B
Row 3: 11/02/2018--A
Row 4: 11/12/2018--B
Row 5: 11/13/2018--A
Row 6: 11/13/2018--A
Row 7: 11/13/2018--C
Row 8: 11/13/2018--C
In this case the formula in Sheet 2 should display a count of 3 since yesterday's date is 11/13/2018 and has the letter A 3 times.
Thank you!!
excel formula
Hello and thanks in advance for the response.
I have an excel workbook in which Sheet 1 is a data table and Sheet 2 will contain a number of formulas that pull from Sheet 1.
Specifically, I have two columns in Sheet 1, one with dates and one with letters (A-D) and I want to count each time the date column is yesterday's date and the letter is A. NOTE: This needs to be a formula not VBA.
Col A: Date -- Col B: Letter
Row 1: 11/13/2018--A
Row 2: 11/11/2018--B
Row 3: 11/02/2018--A
Row 4: 11/12/2018--B
Row 5: 11/13/2018--A
Row 6: 11/13/2018--A
Row 7: 11/13/2018--C
Row 8: 11/13/2018--C
In this case the formula in Sheet 2 should display a count of 3 since yesterday's date is 11/13/2018 and has the letter A 3 times.
Thank you!!
excel formula
excel formula
edited Nov 15 '18 at 8:38
Thilina Nakkawita
96811229
96811229
asked Nov 15 '18 at 4:46
ThomasThomas
1
1
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Please try:
=SUMPRODUCT(--(Sheet1!A1:A8=TODAY()-1),--(Sheet1!B1:B8="A"))
add a comment |
SUMPRODUCT((Table1[Date]=D1)*(Table1[Letter]=E1))
add a comment |
Assuming you have actual dates and not strings that resemble dates you can use CountIfs as follows:
=COUNTIFS($A$2:$A$9,TODAY()-1,$B$2:$B$9,"A")
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
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%2fstackoverflow.com%2fquestions%2f53312570%2fexcel-count-each-time-yesterdays-date-and-a-second-criteria-appear-on-a-diffe%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Please try:
=SUMPRODUCT(--(Sheet1!A1:A8=TODAY()-1),--(Sheet1!B1:B8="A"))
add a comment |
Please try:
=SUMPRODUCT(--(Sheet1!A1:A8=TODAY()-1),--(Sheet1!B1:B8="A"))
add a comment |
Please try:
=SUMPRODUCT(--(Sheet1!A1:A8=TODAY()-1),--(Sheet1!B1:B8="A"))
Please try:
=SUMPRODUCT(--(Sheet1!A1:A8=TODAY()-1),--(Sheet1!B1:B8="A"))
answered Nov 15 '18 at 5:14
pnutspnuts
49.1k764101
49.1k764101
add a comment |
add a comment |
SUMPRODUCT((Table1[Date]=D1)*(Table1[Letter]=E1))
add a comment |
SUMPRODUCT((Table1[Date]=D1)*(Table1[Letter]=E1))
add a comment |
SUMPRODUCT((Table1[Date]=D1)*(Table1[Letter]=E1))
SUMPRODUCT((Table1[Date]=D1)*(Table1[Letter]=E1))
answered Nov 15 '18 at 6:16
Michal RosaMichal Rosa
1,3361815
1,3361815
add a comment |
add a comment |
Assuming you have actual dates and not strings that resemble dates you can use CountIfs as follows:
=COUNTIFS($A$2:$A$9,TODAY()-1,$B$2:$B$9,"A")
add a comment |
Assuming you have actual dates and not strings that resemble dates you can use CountIfs as follows:
=COUNTIFS($A$2:$A$9,TODAY()-1,$B$2:$B$9,"A")
add a comment |
Assuming you have actual dates and not strings that resemble dates you can use CountIfs as follows:
=COUNTIFS($A$2:$A$9,TODAY()-1,$B$2:$B$9,"A")
Assuming you have actual dates and not strings that resemble dates you can use CountIfs as follows:
=COUNTIFS($A$2:$A$9,TODAY()-1,$B$2:$B$9,"A")
answered Nov 15 '18 at 8:17
QHarrQHarr
36.7k82144
36.7k82144
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- 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%2fstackoverflow.com%2fquestions%2f53312570%2fexcel-count-each-time-yesterdays-date-and-a-second-criteria-appear-on-a-diffe%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