Firstly: Making up Fasts for the Excused Deceased
There is nothing upon the one who had wajib fasts to make up then passed away without making them up due to a valid excuse, neither making up fasts on his behalf nor paying compensation. This is by agreement of the four schools of jurisprudence and it is the position of the majority of scholars.
Secondly: Making up Fasts on Behalf of the Non-excused
Whoever passes away while having wajib fasts to make up, whether votive fasting, as expiation, or from Ramadan, and he had full ability and time to do so but did not until he died, then it is permissible for his guardian  The guardian which makes up his fast is his inheritor. to fast on his behalf. If he chooses not to fast, then he feeds a destitute person for every missed day. This is the old position of al-Shafi`i, chosen by al-Nawawi, Ibn Baz, and Ibn `Uthaymin.
Thirdly: Making up Fasts on Behalf of the Living
Fasting cannot be performed on behalf of the living. Consensus has been quoted on this by Ibn Hazm, Ibn `Abd al-Barr, Ibn al-`Arabi, al-Qadi `Iyad, and al-Nawawi.