Yes. Couple of tips: use datatypes on your parameter declarations and your Function declaration, and "Range" is a (very commonly used) object in Excel so picking a different name for your function ...
DATEDIF(), which means Date + Dif, is a compatibility function left over from Lotus 1-2-3 that Microsoft adopted in Excel version 2000, which is the only version that explains how this function works.
Results that may be inaccessible to you are currently showing.
Hide inaccessible results