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 ...
Macros are powerful, but they don't work on the web or mobile. I’ve switched to the native REDUCE function for my complex ...
R1C1 coordinates provide a predictable map for auditing formulas and writing universal VBA macros.