Excel will immediately return you in the first cell. Some people now consider Excel very expensive in comparison to free alternatives. Therefore, the very first step is to double check Excel’s listing of native functions to find out whether there’s already one which will do the calculations you’re thinking about.
db-excel.com
Excel Spreadsheet Template