Try this:
IF(IFERROR(MATCH(ROW(),$C$4:$C$12,0),0)>0,INDIRECT("M"&4+IFERROR(IF(ROW()=4,0,MATCH(ROW(),$C$4:$C$12,0)-1),0)),"")
You can also use the help column in C4:C12, which you will need to expand to get to 280, to see whether there is a method to shorten the formulae.