All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Offering sacrifice on behalf of a deceased person is permissible. This is a kind of giving charity from a deceased person.
It is also permissible to sacrifice an animal on behalf of many deceased persons or one may offer it on behalf of many alive and deceased persons of his family.
However, giving the price of sacrifice on behalf of the deceased in charity is better except if one knows that the deceased wished to sacrifice an animal after his death on his/her behalf. In this case, offering sacrifice is better since by doing so one fulfills the desire of the deceased person and also gives charity on his behalf.
Allah knows best.