Try using OFFSET and COUNT as in the attachement. I filled in your first three rows with numbers. If sometimes some of the interior rows will be blank, then the formulas will need adjustment. Perhaps this will get you started. (Edited to add the attachemt)