Can you fast for someone else?

Under what circumstances can you fast for someone else’s behalf?
My mum wants to fast for my ill grandmother (her mother), if she can fast for her, does my grandmother still have to feed/pay the poor for her missed fasts or not as my mum fasted for her?

Salaams… fasting is an individual duty as Allah (swt) has obliged EVERY Muslim who is of age and abled body and mind to fast:

“O you who believe! fasting has been prescribed for you, as it was prescribed for those before you, so that you may attain Taqwa (piety). [2:184]

Muhammad (saw) said: “Whenever you sight the new moon (of the month of Ramadhan) observe fast, and when you sight it (the new moon of Shawwal) break it, and if the sky is cloudy for you, then observe fast for thirty days”. [Muslim]

Those who are exempt have to make up their missed fasts or pay kaffara for each fast missed. See below for more detailed answer:

There is no ambiguity regarding fasting for persons who are unable because of any sort of illness or during traveling. Allaah says in Qur’an;

“and whoever is ill or on a journey, the same number [of days which one did not observe Sawm (fasts) must be made up] from other days. Allaah intends for you ease, and He does not want to make things difficult for you. (He wants that you) must complete the same number (of days), and that you must magnify Allaah [i.e. to say Takbeer (Allaahu Akbar: Allaah is the Most Great)] for having guided you so that you may be grateful to Him” [al-Baqarah 2:185]

If a person is unable to fast because of illness or traveling. then he has to make up the fasts (after Eid and in the month of Shawwal) for the days (of illness and traveling), he has missed, when he becomes able to.

However, if there is no hope – according to doctors – that one may be cured and recovered from his sickness or that his illness worsens if he fasts, then he is exempted from fasting. As for compensation he has to pay ‘fidya’ or to feed one poor person for every day that he misses.

There is no such thing like ‘qasr’ (short) ‘saum’ (fast) for sick persons like ‘qasr’ (short) ‘salah’ (prayers) for travelers.