I was suggested to look into Dynamic Named Ranges so i did, but i ran into something i cant understand.

In column C i have dates. I have formula that count all the dates that are older than 20 days. The formula works perfectly. Now i made a Dynamic Named Range of the column A and now the formula results in #VALUE.
Why?

this is the formula that i use
=SUMPRODUCT((dates!$C$1-G!$C$2:$C$5880>dates!$C$4)*1)
this one works

but when i try this it dosnt
=SUMPRODUCT((dates!$C$1-date>dates!$C$4)*1)

i named the range date and in the refers box i wrote
=OFFSET(G!$C$1;0;0;COUNT(G!$C:$C);1)