Use SEQUENCE function to create a dynamic array in Excel