alanhather
New Member
- Joined
- Feb 2, 2018
- Messages
- 24
Hi,
Im trying to count all the people in on total people column and then trying to count them again but using there ID. But if it comes up twice to count it as 1 in a date range.
Im using a Raw data download of about 4000 records and trying to stay away from an array formula that does work but, it slows down my computer.
here is an example of what im doing.
Raw Data Sample
[TABLE="width: 362"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]Date[/TD]
[/TR]
[TR]
[TD]A1223B[/TD]
[TD]John[/TD]
[TD="align: right"]01/01/2017[/TD]
[/TR]
[TR]
[TD]B112W[/TD]
[TD]David[/TD]
[TD="align: right"]01/02/2017[/TD]
[/TR]
[TR]
[TD]A586FD[/TD]
[TD]Kim[/TD]
[TD="align: right"]02/02/2017[/TD]
[/TR]
[TR]
[TD]7854S[/TD]
[TD]Daniel[/TD]
[TD="align: right"]03/02/2017[/TD]
[/TR]
[TR]
[TD]14541S[/TD]
[TD]Cara[/TD]
[TD="align: right"]04/02/2017[/TD]
[/TR]
[TR]
[TD]A1223B[/TD]
[TD]John[/TD]
[TD="align: right"]01/01/2017[/TD]
[/TR]
[TR]
[TD]9S5SJKS[/TD]
[TD]David[/TD]
[TD="align: right"]01/04/2017[/TD]
[/TR]
[TR]
[TD]S45S41S[/TD]
[TD]Kim[/TD]
[TD="align: right"]02/04/2017[/TD]
[/TR]
[TR]
[TD]S44558S[/TD]
[TD]Daniel[/TD]
[TD="align: right"]03/04/2017[/TD]
[/TR]
[TR]
[TD]A1233A[/TD]
[TD]Cara[/TD]
[TD="align: right"]01/01/2017[/TD]
[/TR]
[TR]
[TD]A1223A[/TD]
[TD]John[/TD]
[TD="align: right"]01/01/2017[/TD]
[/TR]
[TR]
[TD]8S745S2[/TD]
[TD]David[/TD]
[TD="align: right"]02/01/2017[/TD]
[/TR]
[TR]
[TD]S55S5SS[/TD]
[TD]Richard[/TD]
[TD="align: right"]03/01/2017[/TD]
[/TR]
[TR]
[TD]58S74SS[/TD]
[TD]Daniel[/TD]
[TD="align: right"]04/01/2017[/TD]
[/TR]
[TR]
[TD]A1233A[/TD]
[TD]Cara[/TD]
[TD="align: right"]01/01/2017
[/TD]
[/TR]
</tbody>[/TABLE]
Result Table
[TABLE="width: 251"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Dates[/TD]
[TD="align: right"]01/01/2017[/TD]
[TD="align: right"]31/01/2017[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Total People[/TD]
[TD]Total ID[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]David[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Kim[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Daniel[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Cara[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]
Total People Column =COUNTIFS($C$2:$C$16,">="&$F$1,$C$2:$C$16,"<="&$G$1,$B$2:$B$16,E3)
Total ID =SUMPRODUCT(--($C$2:$C$16>=$F$1),--($C$2:$C$16<=$G$1),--($B$2:$B$16=E3),--1/COUNTIF($A$2:$A$16,$A$2:$A$16))
When I use the sum product formula on the big raw data sheet it returns a value of 0. Cant see what is going wrong.
here is a copy of the array formula im using now to achieve this.
=SUM(--(FREQUENCY(IF('Raw Data Prev Year'!$B:$B<>"",IF('Raw Data Prev Year'!$D:$D=A36,IF('Raw Data Prev Year'!S:S>=$B$50,IF('Raw Data Prev Year'!$S:$S<=$C$50,MATCH('Raw Data Prev Year'!$B:$B,'Raw Data Prev Year'!$B:$B,0))))),ROW('Raw Data Prev Year'!$B:$B)-ROW('Raw Data Prev Year'!$B$1)+1)>0))
Many thanks for the help.
Im trying to count all the people in on total people column and then trying to count them again but using there ID. But if it comes up twice to count it as 1 in a date range.
Im using a Raw data download of about 4000 records and trying to stay away from an array formula that does work but, it slows down my computer.
here is an example of what im doing.
Raw Data Sample
[TABLE="width: 362"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]Date[/TD]
[/TR]
[TR]
[TD]A1223B[/TD]
[TD]John[/TD]
[TD="align: right"]01/01/2017[/TD]
[/TR]
[TR]
[TD]B112W[/TD]
[TD]David[/TD]
[TD="align: right"]01/02/2017[/TD]
[/TR]
[TR]
[TD]A586FD[/TD]
[TD]Kim[/TD]
[TD="align: right"]02/02/2017[/TD]
[/TR]
[TR]
[TD]7854S[/TD]
[TD]Daniel[/TD]
[TD="align: right"]03/02/2017[/TD]
[/TR]
[TR]
[TD]14541S[/TD]
[TD]Cara[/TD]
[TD="align: right"]04/02/2017[/TD]
[/TR]
[TR]
[TD]A1223B[/TD]
[TD]John[/TD]
[TD="align: right"]01/01/2017[/TD]
[/TR]
[TR]
[TD]9S5SJKS[/TD]
[TD]David[/TD]
[TD="align: right"]01/04/2017[/TD]
[/TR]
[TR]
[TD]S45S41S[/TD]
[TD]Kim[/TD]
[TD="align: right"]02/04/2017[/TD]
[/TR]
[TR]
[TD]S44558S[/TD]
[TD]Daniel[/TD]
[TD="align: right"]03/04/2017[/TD]
[/TR]
[TR]
[TD]A1233A[/TD]
[TD]Cara[/TD]
[TD="align: right"]01/01/2017[/TD]
[/TR]
[TR]
[TD]A1223A[/TD]
[TD]John[/TD]
[TD="align: right"]01/01/2017[/TD]
[/TR]
[TR]
[TD]8S745S2[/TD]
[TD]David[/TD]
[TD="align: right"]02/01/2017[/TD]
[/TR]
[TR]
[TD]S55S5SS[/TD]
[TD]Richard[/TD]
[TD="align: right"]03/01/2017[/TD]
[/TR]
[TR]
[TD]58S74SS[/TD]
[TD]Daniel[/TD]
[TD="align: right"]04/01/2017[/TD]
[/TR]
[TR]
[TD]A1233A[/TD]
[TD]Cara[/TD]
[TD="align: right"]01/01/2017
[/TD]
[/TR]
</tbody>[/TABLE]
Result Table
[TABLE="width: 251"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Dates[/TD]
[TD="align: right"]01/01/2017[/TD]
[TD="align: right"]31/01/2017[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Total People[/TD]
[TD]Total ID[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]David[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Kim[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Daniel[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Cara[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]
Total People Column =COUNTIFS($C$2:$C$16,">="&$F$1,$C$2:$C$16,"<="&$G$1,$B$2:$B$16,E3)
Total ID =SUMPRODUCT(--($C$2:$C$16>=$F$1),--($C$2:$C$16<=$G$1),--($B$2:$B$16=E3),--1/COUNTIF($A$2:$A$16,$A$2:$A$16))
When I use the sum product formula on the big raw data sheet it returns a value of 0. Cant see what is going wrong.
here is a copy of the array formula im using now to achieve this.
=SUM(--(FREQUENCY(IF('Raw Data Prev Year'!$B:$B<>"",IF('Raw Data Prev Year'!$D:$D=A36,IF('Raw Data Prev Year'!S:S>=$B$50,IF('Raw Data Prev Year'!$S:$S<=$C$50,MATCH('Raw Data Prev Year'!$B:$B,'Raw Data Prev Year'!$B:$B,0))))),ROW('Raw Data Prev Year'!$B:$B)-ROW('Raw Data Prev Year'!$B$1)+1)>0))
Many thanks for the help.