Countif with vlookup

najamabbas

New Member
Joined
Jun 10, 2015
Messages
9
Office Version
  1. 2016
Platform
  1. Windows
Dear Excel Gurus, There are multiple records against one date with Yes/NO information. I need to calculate in a separate table that how many are "Yes" against given date. Following are two tables:

DateYes/NoDateTotal "Yes"
June 8, 2015June 8, 2015
June 8, 2015YesJune 9, 2015
June 8, 2015YesJune 10, 2015
June 8, 2015
June 8, 2015Yes
June 8, 2015
June 9, 2015
June 9, 2015Yes
June 9, 2015Yes
June 9, 2015
June 10, 2015
June 10, 2015Yes
June 10, 2015

<tbody>
</tbody>

Any help would be highly appreciated.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

steve the fish

Well-known Member
Joined
Oct 20, 2009
Messages
8,886
Office Version
  1. 365
Platform
  1. Windows
Hi. What you need is COUNTIFS like this for example:

=COUNTIFS($A$2:$A$14,D2,$B$2:$B$14,"Yes")
 
Upvote 0

najamabbas

New Member
Joined
Jun 10, 2015
Messages
9
Office Version
  1. 2016
Platform
  1. Windows
When i insert that into the spreadsheet, i get "Value" error because "D2" is actually "Q5" in my spreadsheet. When i evaluate the formula, it's converting Q5 value to "42163" for some reason.

Although Date format of these two cells are exactly the same.
 
Upvote 0

steve the fish

Well-known Member
Joined
Oct 20, 2009
Messages
8,886
Office Version
  1. 365
Platform
  1. Windows
ADVERTISEMENT
A value error? Cant think why? Just using that formula I suggested? The 42163 is the 8th of June 2015 so for it to compare properly the compared dates need to be the same. 42163 is a true date, June 8, 2015 isn't necessarily.
 
Upvote 0

najamabbas

New Member
Joined
Jun 10, 2015
Messages
9
Office Version
  1. 2016
Platform
  1. Windows
Yes i have no idea why i am getting this as i checked few times to ensure i am capturing correct cell references.
 
Upvote 0

najamabbas

New Member
Joined
Jun 10, 2015
Messages
9
Office Version
  1. 2016
Platform
  1. Windows
Sorry i typed the formula wrong. Thank you so much for your quick response. it's working properly now.
 
Upvote 0

Forum statistics

Threads
1,195,838
Messages
6,011,891
Members
441,652
Latest member
FuelGuy

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
Top