عَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ: ((إِذَا قَالَ الْقَارِئُ سَمِعَ اللَّهُ لِمَنْ حَمِدَهُ فَقَالَ مَنْ خَلْفَهُ: اللَّهُمَّ رَبَّنَا لَكَ الْحَمْدُ غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ))
It is narrated from Sayyiduna Abu Hurairah, may Allah be pleased with him, that the Messenger of Allah, peace and blessings be upon him, said: When the Imam says "Sami' Allahu liman hamidah" and after that the follower says "Allahumma Rabbana lakal hamd," his past sins are forgiven.