![]() |
Count Data in two Columns
I have a spreadsheet of jobs worked by two different employees
structured like this... Date Job Emp 1 Emp 2 1/1 Installation John Smith Rick Johnson 1/1 Installation Rick Johnson John Smith 1/2 Construction John Smith Eric Richards 1/3 Installation John Smith Rick Johnson ....The two employee fields represent unique jobs - so I need to keep that data the way that it is for tracking purposes - but I'd also like to get a count of how many times a pair of employees worked together regardless of the job. In other words, the above would yield the results John Smith and Rick Johnson 3 John Smith and Eric Richards 1 Any thoughts? I'd also be open to something in Access if it isn't too complicated. Thanks! |
Count Data in two Columns
One way:
=SUMPRODUCT(--(B1:B4=J1),--(C1:C4=K1)) Column B has Employee 1 and Column C has Employee 2. J1 and K1 are the two employees of which you want a count of when they worked together. HTH, Paul wrote in message oups.com... I have a spreadsheet of jobs worked by two different employees structured like this... Date Job Emp 1 Emp 2 1/1 Installation John Smith Rick Johnson 1/1 Installation Rick Johnson John Smith 1/2 Construction John Smith Eric Richards 1/3 Installation John Smith Rick Johnson ...The two employee fields represent unique jobs - so I need to keep that data the way that it is for tracking purposes - but I'd also like to get a count of how many times a pair of employees worked together regardless of the job. In other words, the above would yield the results John Smith and Rick Johnson 3 John Smith and Eric Richards 1 Any thoughts? I'd also be open to something in Access if it isn't too complicated. Thanks! |
Count Data in two Columns
Try this in E2:
=SUMPRODUCT(--(C2:C5=C2),--(D2:D5=D2))+SUMPRODUCT(--(C2:C5=D2),-- (D2:D5=C2)) Hth, Merjet |
All times are GMT +1. The time now is 08:37 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com