finding multiple parent-child relationships?
My best shot so far is the following, which doesn't work because (I think)
the last B:B is seen as a single cell (whichever row it is on) rather than
the full range for each comparison. Any ideas?
=SUMPRODUCT((B:B=A2)*(MATCH(A:A,B:B,FALSE)))
Thanks!
"Keith R" wrote in message
...
I have a list of a bunch of people (employees) (column A) and in another
column (B), their managers. Each employee has a single record, but a
manager name can show up multiple times. Not all employees are managers.
I need to identify which managers are "front line" managers, e.g. who do
not have any other managers reporting to them. I'd like to avoid going to
VBA if this is possible to do in a formula.
Basically, my logic needs to be: For every manager, check their direct
reports to see if they also show up in the manager column. If none do,
then flag this individual as a front line manager
The problem I'm having is figuring out how to get a formula to process
/every/ direct report. I'll need to use sumproduct or an array formula,
but I'm still getting stuck on the logic. Let's say I copy column A to
column C, just so I can do vlookups on either group.
=sumproduct
((A1:A1000=ThisManager)*(vlookup(B1:B1000,B1:C1000 ,2,False).... but even
here, I don't think the vlookup will necessarily be on the same row as the
first parts of my sumproduct?
Any ideas to get me started?
Thanks!
Keith
|