Normally you would add something for when the condition is FALSE,

with just

=IF(B3=HCA1!$A$2,SUM(HCA1!E:E))

If B3 is not equal to HCA1!$A$2 then the formula will return FALSE, you could make it return some text or another value or even a blank in that case, e.g. for a blank

=IF(B3=HCA1!$A$2,SUM(HCA1!E:E),"")

put something in between the quotes for other text