G
Greg in CO
Me again!
I have a variation on a problem I received the solution for from you fine
folks, and my attemtps to tweek the formula I'm using haven't been all that I
would hope.
So, here goes:
This is the same sheet from my question "To Count or not to Count" for which
I got this spiffy formula that confirms the existance of an entry in Column A
and in Column N and then counts the corresponding entry in Column N:
=SUMPRODUCT(--($A$12:$A$34<>""),--(N12:N34<>""))
What I need to add to this formula is an argument where the formula now
compares a range of position on Worksheet B (abbrev. for here WSB) for a
department, and, if there is a match, returns the count of the corresponding
positions on WSA. I looked at SUMPRODUCT where there were = arguments for
specific criteria, but I need the formula to match any criteria in a range.
On Worksheet A (abbrev. for here WSA), in Column A I have a list of
positions (Chief Chicken Plucker, Beek Tweaker, Feather Fluffer, etc.), in
Column N I have the hours for each role for January.
So, WSB is a worksheet where various information for a specific department
(Plucking and Tweaking Department) is fed from other worksheets. It has in
Column A a list of positions for that department only (Chief Chicken Plucker,
Beek Tweaker, etc.....Feather Fluffer is not part of this department). On
WSB, there are cells labled according to the months, like on WSA.
What I have tried to make the formula do is, for a count result in the
January cell on WSB, compare any entry on WSB Column A (Positions specific to
the Plucking and Tweaking Dept.) against any entry on WSA Column A (Position)
and where there is a match (versus just any entry at all), confirm there is a
corresponding entry in Column N on WSA, and then return count of
corresponding entries in Column N (Hours) on WSA.
WSA:
Column A Column N
Chief Chicken Plucker 40
Beek Tweaker 40
Feather Fluffer 10
WSB:
Column A
Chief Chicken Plucker
Beek Tweaker
Count returned in Jan cell on WSB: 2
Logic: Since, on WSA, Column A there are two entries that match entries on
WSB Column A, look in Column N on WSA, confirm there are entries
corresponding to the entries in Column A and count them.
Thanks in advance for any help...in reading the posts here, I have learned
tons!
I have a variation on a problem I received the solution for from you fine
folks, and my attemtps to tweek the formula I'm using haven't been all that I
would hope.
So, here goes:
This is the same sheet from my question "To Count or not to Count" for which
I got this spiffy formula that confirms the existance of an entry in Column A
and in Column N and then counts the corresponding entry in Column N:
=SUMPRODUCT(--($A$12:$A$34<>""),--(N12:N34<>""))
What I need to add to this formula is an argument where the formula now
compares a range of position on Worksheet B (abbrev. for here WSB) for a
department, and, if there is a match, returns the count of the corresponding
positions on WSA. I looked at SUMPRODUCT where there were = arguments for
specific criteria, but I need the formula to match any criteria in a range.
On Worksheet A (abbrev. for here WSA), in Column A I have a list of
positions (Chief Chicken Plucker, Beek Tweaker, Feather Fluffer, etc.), in
Column N I have the hours for each role for January.
So, WSB is a worksheet where various information for a specific department
(Plucking and Tweaking Department) is fed from other worksheets. It has in
Column A a list of positions for that department only (Chief Chicken Plucker,
Beek Tweaker, etc.....Feather Fluffer is not part of this department). On
WSB, there are cells labled according to the months, like on WSA.
What I have tried to make the formula do is, for a count result in the
January cell on WSB, compare any entry on WSB Column A (Positions specific to
the Plucking and Tweaking Dept.) against any entry on WSA Column A (Position)
and where there is a match (versus just any entry at all), confirm there is a
corresponding entry in Column N on WSA, and then return count of
corresponding entries in Column N (Hours) on WSA.
WSA:
Column A Column N
Chief Chicken Plucker 40
Beek Tweaker 40
Feather Fluffer 10
WSB:
Column A
Chief Chicken Plucker
Beek Tweaker
Count returned in Jan cell on WSB: 2
Logic: Since, on WSA, Column A there are two entries that match entries on
WSB Column A, look in Column N on WSA, confirm there are entries
corresponding to the entries in Column A and count them.
Thanks in advance for any help...in reading the posts here, I have learned
tons!