Hello Tom,

This seems to work. Don't ask me why, I picked it up elsewhere and haven't had time to work out the details.

=AVERAGE(INDEX(B1:NB1,,LOOKUP(9,COUNTIF(OFFSET(NB1,,-COLUMN(B1:NB1)+COLUMN(B1),,COLUMN(B1:NB1)-COLUMN(B1)+1),"<>"),COLUMNS(B1:NB1)-COLUMN(B1:NB1)+1)):NB1)

B1 to NB1 are your 365 columns. The number at the start of the LOOKUP has to be one less than the number that you want to average.

Harry