"empty cells" would not generate the #N/A error.
It sounds as though you have underlying error values in either of or indeed both of the ranges referenced ... on which basis: what does the below return ?
![]()
=SUM(IF(NOT(ISNA(Sheet1!$D$2:$D$5000))*ISNUMBER(Sheet1!$I$2:$I$5000);(Sheet1!$D$2:$D$5000=$A2)*Sheet1!$I$2:$I$5000)) confirmed with CTRL + SHIFT + ENTER
Bookmarks