Problem counting records

heimdal

New member
Joined
Apr 29, 2020
Messages
4
Reaction score
0
Points
0
Excel Version(s)
Excel 2013
Hi, I have a excel data set that contains the following:

Position | 1 Feb | 2 Feb | 3 Feb |
------------------------------------------
Position 1 | A | A | C |
Position 2 | B | A | D |
Position 1 | D | A | C |

So the data represents the projects (A, B, C, D) that different people work during the month of February.

The sheet counts the number of Days spent on each project using Countif. For exam Project A = 4

I have had a request to be about to give the number of days spent on a project by position. For example Position 1 - Project A = 3

I started out trying to using an AND but don't know how to deal with the fact I only want to to Count the cells on certain rows.

I am current using Excel 2013, but if this is not possible, maybe able to use Excel 365.
 
Try

[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]=SUMPRODUCT(($A$1:$A$4="Position 1")*($B$1:$D$4="A"))[/FONT]
 
This is assuming your query is "position 1" and "A"=4 result will give you 12.

=SUMPRODUCT(COUNTIFS($A:$A,"position 1",$B:$B,"A")+COUNTIFS($A:$A,"position 1",$C:$C,"A")+COUNTIFS($A:$A,"position 1",$D:$D,"A"))*4
 
Thanks Bob, that worked like a charm.
 
Back
Top