So I have a spread sheet that look like this

A B C D E....W
Country A 1980
Country A 1981
.
.
.
Country A 2004
Country B
.
.
.

With different variables in each column. I want to take a 5 year average i.e. country A between 1980-1984 and country A 1985-1989...etc.)

I tried using offset but I couldn't program it correctly. I don't mind doing each individual column...autofill wasn't doing what I wanted.