Hello,
I have a dataset that is sorted in ascending order by account and by KM.
If there is a null for Year, I'd like the output to be the average between the last entered year before the null, the the next entered year after the null(s). If a new account code does not have any Year entires at the beginning, the output should take the first year entry that occurs.
Please see below an example of my problem and what the desired output is. Can anyone suggest anything? I have attached the below in spreadsheet form.

Thank you!!
Bianca