ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Counting Cells in a column depending on another column but excluding duplicates (https://www.excelbanter.com/excel-discussion-misc-queries/261207-counting-cells-column-depending-another-column-but-excluding-duplicates.html)

rwenger

Counting Cells in a column depending on another column but excluding duplicates
 
1 Attachment(s)
Hello,
I would like to count the total in a column depending on another column, but exclude duplicates.
I my case I would like to know how many employees (column A) have taken a course in 2010 (column B). Column A has duplicate names. Column B has 2009 and 2010 as the year the course was taken. I want to count 2009 and 2010 separately. I named the range of column A course_attendees and column B course_taken

Name Course Year
Wilbert Bugay 2009
Wilbert Bugay 2009
Zahid Gul 2009
Zin Minn Lwin 2009
Zin Minn Lwin 2009
Shivanand Sampengi 2010
P S Rajesh 2010
C P Susheendran 2010
Raghavan Santosh 2010
Shibith Koran 2010
Vavakassim Azeez 2010
Shivanand Sampengi 2010
Rachel Padre 2010
P S Rajesh 2010
V U Radhakrishnan 2010


I have tried the following formula, but it gives me the incorrect answer

=SUMPRODUCT(--(course_year=2010)*(Course_attendees<"")/COUNTIF(Course_attendees,Course_attendees&""))

Can anyone help me?

Thank you.

Rene


All times are GMT +1. The time now is 04:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com