Hello,

I have an Excel sheet (SheetA) that refers to another to collect data (SheetB). SheetB is used for presenting the initial data, and SheetA is hidden and used solely as a bridge for charts on other sheets. Because SheetB is used in presentations, it must be kept neat, and any cells not in use must be deleted.

Long story short, is there any formula that allows the cells on SheetA to return a value equal to 0 if one or all of the reference cells are deleted from SheetB?

I am just looking for a general formula that I can add to my existing.

Example:

'SheetB'!A1=P
'SheetB'!B1=E

'SheetA'!A1=COUNTIFS('SheetB'!$A1:$A4,"P",'SheetB'!$B1:$B4,"E")

The resulting count would be 1

If I were to delete rows 1-4 from SheetB, I need the count to equal 0, not #REF!

Thank you in advance