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.
The Ultimate Excel VBA Certification Bundle + Microsoft Office Professional Plus 2021 for Windows: Lifetime License is the perfect place to start learning. Not only can this bundle teach you to master ...