Why can I not sum() the third column. Using nested if(and()) to test date column and a name column which returns the correctly assigned 1 or 2

D E F
06/30/2018 I 1
06/30/2018 I 1
06/30/2018 C 2
06/30/2018 I 1
06/30/2018 I 1

Third column formula
=IF(AND(YEAR(D23)=2018,E23=“I”),“1”,)&IF(AND(YEAR(D23)=2018,E23=“C”),“2”,)&IF(AND(YEAR(D23)=2018,E23=“H”),“1”,)&IF(AND(YEAR(D23)=2018,E23=“Life”),“1”,)
I’m a rookie so be gentle

Do you want sum or concatenate?

if you will create small auxiliary value table like this

small auxiliary value table

then your formula will be much easier

=(YEAR(D23)=2018)*IFERROR(VLOOKUP(E23, $M$2:$N$5, 2, 0), 0)

Thank you very much! It works perfectly. Solved.