Hello,
I am trying to write a formula that counts for every time a person appears in a table whilst also checking whether they appear in the selected year.
First sheet ('enter data'):
Second sheet: this is what I want it to look like:
So the formula I have in column C in the second table is currently (that is wrong):
Where IM_Case an offset formula that effectively tracks column A above; if you must know:
and TM_ests_month_list is a similar offset formula that tracks column C in the first sheet:
However I know this is wrong because it is comparing the full dates of say 01/10/2021 against the date of 2021 (which I believe would default to 01/01/2021). I somehow need to insert a formula similar to this:
But I can't get my head around how to do that! Can someone help please?
I am trying to write a formula that counts for every time a person appears in a table whilst also checking whether they appear in the selected year.
First sheet ('enter data'):
Case number | Person | Date signed up |
1 | Person A | 01/10/2021 |
2 | Person A | 01/08/2021 |
3 | Person A | 01/01/2022 |
4 | Person B | 01/10/2021 |
Second sheet: this is what I want it to look like:
Year (drop down) | List of people | Case count for year |
2021 | Person A | 2 |
Person B | 1 | |
So the formula I have in column C in the second table is currently (that is wrong):
Excel Formula:
=IF(B2="",0,((COUNTIFS(IM_case,$B2,TM_ests_month_list,$A$2))))
Where IM_Case an offset formula that effectively tracks column A above; if you must know:
Excel Formula:
=OFFSET('Enter data'!$$2,0,0,COUNTA('Enter data'!$A:$A)-1,1)
and TM_ests_month_list is a similar offset formula that tracks column C in the first sheet:
Excel Formula:
=OFFSET('Enter data'!$C$2,0,0,COUNTA('Enter data'!$A:$A)-1,1)
However I know this is wrong because it is comparing the full dates of say 01/10/2021 against the date of 2021 (which I believe would default to 01/01/2021). I somehow need to insert a formula similar to this:
Excel Formula:
=IF(YEAR(A2)=YEAR(TM_ests_month_list),[value if true], [value if false])
But I can't get my head around how to do that! Can someone help please?