Countifs formula across multiple sheets

jme_4477

New Member
Joined
Mar 24, 2016
Messages
43
I need to compare student IDs on sheets Adds Drops (Column B) to Sheet2 (Column C), and then cross-reference that with the date on both sheets: Adds Drops (Column B) and Sheets2 (Column I). If the dates on Sheets2 (Column I) is more than 7 days later than the date on Adds Drops (Column B) for any student ID, I need a total. So if any students have not been contacted in more than 7 days, it should just give me the total number of students with no contact. This total will appear on a different sheet all together.

Here's a link to the file:

https://drive.google.com/file/d/1JpR...ew?usp=sharing
 

Toadstool

Active Member
Joined
Mar 5, 2018
Messages
446
Office Version
2016
Platform
Windows
Google Drive says "Sorry, the file you have requested does not exist.
Make sure that you have the correct URL and the file exists."
 

Toadstool

Active Member
Joined
Mar 5, 2018
Messages
446
Office Version
2016
Platform
Windows
jme_4477,

You'll need to extend the Sheet2 search as far down as you may enter data but this should do what you want. In Adds Drops I added column D and copied this formula down:
=IFERROR(IF(INDEX(Sheet2!$I$2:$I$33,MATCH(B1,Sheet2!$C$2:$C$33,0))-7>A1,1,0),0)

E1 is the total you want to put on another sheet and is just: =SUM(D:D)


ABCDE
130-Jul2833720Whalan, John13
20
315-Jul2827280Harley, Bee1
415-Jul2787711Spitz, Alex1
515-Jul2834784Teeper, Daxter0
60
715-Aug2827597Lyning, Abby0
80
918-Aug2837420Marble, Dustin0

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Adds Drops

Worksheet Formulas
CellFormula
D1
=IFERROR(IF(INDEX(Sheet2!$I$2:$I$33,MATCH(B1,Sheet2!$C$2:$C$33,0))-7>A1,1,0),0)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Regards,
Toadstool
 

jme_4477

New Member
Joined
Mar 24, 2016
Messages
43
Oh my goodness! Thank you SO much!!!!!! I do have one question though. To extend the search in Sheet2, I would just enter in a higher number like 400 instead of 33, right?
 

Toadstool

Active Member
Joined
Mar 5, 2018
Messages
446
Office Version
2016
Platform
Windows
The dates 8/12 and 8/14 are both more than 7 days later than 15-Jul so I don't understand why Alex Spitz shouldn't be counted?

Your original request was "If the dates on Sheets2 (Column I) is more than 7 days later than the date on Adds Drops (Column B) for any student ID, I need a total." and there was no mention of column J for "WC Date" but I see you've added that in.

Columns D and E in this example are the formula I had for the WW check.
Columns M and N are the ones you added to check WC date.
I wasn't sure if you wanted the counts separate so I've added two more pairs:
  • G and H: Checks "Welcome WM" and "WC Date" and if either are more than 7 days after the Adds Drops date then it adds to the count.
  • J and K: Checks "Welcome WM" and "WC Date" and if both are more than 7 days after the Adds Drops date then it adds to the count.

Yes, to extend just change those ranges. I've changed them all to $193 in my example because that seemed to be the end of the table and the User Id column had some spaces in C196 and C200 so it seemed unsafe to go further.


dd

ABCDEFGHIJKLMN
1WW >7daysWW OR WC >7daysWW AND WC >7daysWC >7days
21-Aug2833720Whalan, John12121212
30000
48-Aug2827280Harley, Bee0000
515-Jul2787711Spitz, Alex1111
615-Jul2834784Teeper, Daxter0000
70000
815-Aug2827597Lyning, Abby0000
90000
1018-Aug2837420Marble, Dustin0000

<tbody>
</tbody>
Adds Drops

Worksheet Formulas
CellFormula
D2=IFERROR(IF(INDEX(Sheet2!$I$2:$I$193,MATCH(B2,Sheet2!$C$2:$C$193,0))-7>A2,1,0),0)
E2=SUM(D:D)
G2=IFERROR(IF(OR(INDEX(Sheet2!$I$2:$I$193,MATCH(B2,Sheet2!$C$2:$C$193,0))-7>A2,INDEX(Sheet2!$J$2:$J$193,MATCH(B2,Sheet2!$C$2:$C$193,0))-7>A2),1,0),0)
H2=SUM(G:G)
J2=IFERROR(IF(AND(INDEX(Sheet2!$I$2:$I$193,MATCH(B2,Sheet2!$C$2:$C$193,0))-7>A2,INDEX(Sheet2!$J$2:$J$193,MATCH(B2,Sheet2!$C$2:$C$193,0))-7>A2),1,0),0)
K2=SUM(J:J)
J10=IFERROR(IF(AND(INDEX(Sheet2!$I$2:$I$193,MATCH(B10,Sheet2!$C$2:$C$193,0))-7>A10,INDEX(Sheet2!$J$2:$J$193,MATCH(B10,Sheet2!$C$2:$C$193,0))-7>A10),1,0),0)
M2=IFERROR(IF(INDEX(Sheet2!$J$2:$J$193,MATCH(B2,Sheet2!$C$2:$C$193,0))-7>A2,1,0),0)
N2=SUM(M:M)

<tbody>
</tbody>

<tbody>
</tbody>
 

jme_4477

New Member
Joined
Mar 24, 2016
Messages
43
Hello,

I'm sorry to bother you, but I have one final question. What would the formula be to count WC Date if there is no date entered for over 7 days from the date in Adds Drops? In other words, if you look at Sheet2, you can see that Bee Harley and Dustin Marble have no date entered in the WC Date column. Then if you look at Adds Drops, you can see that Bee was added on 8/8, and Dustin was added on 8/18. How can I calculate if the date entered on the Sheet2 sheet is over 7 days or if there is not date entered and it is over 7 day from the date entered on the Adds Drops sheet. You helped me with the first part last time, but I didn't realize that I also need the second part.

Here's the link to the doc:
https://drive.google.com/file/d/17eJvCj3GIUgHOq_0sHGpyUKXXHuP2JWw/view?usp=sharing

Thank you again SO much!!!


I need to compare student IDs on sheets Adds Drops (Column B) to Sheet2 (Column C), and then cross-reference that with the date on both sheets: Adds Drops (Column B) and Sheets2 (Column I). If the dates on Sheets2 (Column I) is more than 7 days later than the date on Adds Drops (Column B) for any student ID, I need a total. So if any students have not been contacted in more than 7 days, it should just give me the total number of students with no contact. This total will appear on a different sheet all together.
 

Forum statistics

Threads
1,085,089
Messages
5,381,649
Members
401,747
Latest member
Jtvan

Some videos you may like

This Week's Hot Topics

Top