Solved

Unique count

Posted on 2011-09-06
3
240 Views
Last Modified: 2012-05-12
hi,

I have 3 columns , column A with date and coulmn B with name of employee and column C with work type.
I want to know the number of days workded by each employee.
1-Feb      a
1-Feb      a
2-Feb      a
2-Feb      a
2-Feb      a
2-Feb      a
2-Feb      a
2-Feb      a
4-Feb      a
4-Feb      a
4-Feb      a
4-Feb      a
1-Feb      B
1-Feb      B
1-Feb      B
2-Feb      B
2-Feb      B
2-Feb      B
2-Feb      B
2-Feb      B
2-Feb      B
3-Feb      B
3-Feb      B
3-Feb      B
3-Feb      B
3-Feb      B


here a should give answer 3 as he has worked for 3 days (1st, 2nd and 4th of Feb)
similarly B should give answer 3 as he has worked for 3 dys.(1st, 2nd and 3rd of Feb)


 
0
Comment
Question by:VasuSidhu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 45

Expert Comment

by:aikimark
ID: 36490114
do you know how to create a pivot table?  That should be able to give you a breakdown of all employees and the days they worked.

How do you need to use this days-worked count? (in code, in formula, other)
0
 
LVL 18

Accepted Solution

by:
krishnakrkc earned 500 total points
ID: 36490223
Hi,

Here is a formula solution..

=SUM(IF(FREQUENCY(IF($B$2:$B$27=D2,IF($A$2:$A$27<>"",MATCH($A$2:$A$27,$A$2:$A$27,0))),ROW($A$2:$A$27)-ROW($A$2)+1),1))

where D2 holds "a"

It's an array formula. Confirmed with CTRL + SHIFT + ENTER.

0
 

Author Closing Comment

by:VasuSidhu
ID: 36490308
Thanks a lot.
I really made my task easy.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Simplify construction of formula 4 57
I need to extract city and state from a cell in Excel 6 29
Custom fill series 12 36
Problem to macro 5 18
A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question