Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default 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!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data count on pivotchart columns? seed Excel Discussion (Misc queries) 0 January 26th 10 05:10 PM
Count of Data Based on Multiple Columns Chris Hofer Excel Worksheet Functions 6 April 26th 07 09:24 PM
How to count data in 2 columns Ltat42a Excel Discussion (Misc queries) 20 May 31st 06 05:55 PM
How do I count data with criteria from two separate columns in exc Scott Excel Worksheet Functions 1 March 2nd 06 04:17 AM
count data from 2 seperate columns Winston Harrell Excel Programming 2 December 21st 05 02:16 PM


All times are GMT +1. The time now is 02:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"