Countifs with match and multiple criteria between two tables

BlueRuby001

New Member
Joined
Mar 24, 2022
Messages
9
Office Version
  1. 2013
Platform
  1. Windows
Wracking brain for two days on this.
Have two tables and trying to count how many in table 1 column A match table 2 column A and of those in table 1 that have matches, how many of those have the value "Y" in table 2 column B.

Tried variations of countifs with match, sumproduct etc with no luck so far and im sure i missed something stupidly simple.

Help is greatly appreciated.
 
Check that your dates are real dates & not text, as it works for me.
+Fluff 1.xlsm
GHIJKL
4Column1DateColumn1Column2
5a22/03/2022by
6b26/03/2022dy
7c27/03/2022e
8d28/03/2022ay
9e29/03/2022fy
10gy
11p
122
Main
Cell Formulas
RangeFormula
G12G12=SUMPRODUCT((COUNTIFS(Table2[Column1],Table1[Column1],Table2[Column2],"y"))*(Table1[Date]>=TODAY()))
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Check that your dates are real dates & not text, as it works for me.
+Fluff 1.xlsm
GHIJKL
4Column1DateColumn1Column2
5a22/03/2022by
6b26/03/2022dy
7c27/03/2022e
8d28/03/2022ay
9e29/03/2022fy
10gy
11p
122
Main
Cell Formulas
RangeFormula
G12G12=SUMPRODUCT((COUNTIFS(Table2[Column1],Table1[Column1],Table2[Column2],"y"))*(Table1[Date]>=TODAY()))
My dates are formatted as dates. I think it has to do with my tables being on different tabs and not on the same sheet as in your screenshot. When i moved my dummy tables to the same sheet the formula worked, but when i try it with them on separate tabs it doesn't work:
1648400868853.png



1648400882426.png
 
Upvote 0
That does not mean anything, they could still be text. If you change the cell format of those dates to General what do you see?
When i change it to General the result is still 0. I ended up just creating a new workbook though and the formula works fine in the new file. I think the other one may just have been corrupt/glitched, i've had issues with the excel software before with functions not working and i have to close and reopen the file then they work. Thank you again for all your help I really appreciate it so much!
 
Upvote 0
In that case they are dates, so don't know why it didn't work initially.
But glad you got it sorted.
 
Upvote 0

Forum statistics

Threads
1,215,352
Messages
6,124,449
Members
449,160
Latest member
nikijon

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top