Riyad as-Salihin, Book 12, Hadith 1342 (In-Book)

Jabir (May Allah be pleased with him) reported: We accompanied the Prophet in an expedition when he said, "Some people have remained behind us in Al-Madinah, and we never cross a valley but they are with us. They share the reward with us because they have been held back by valid excuse."In another narration the wordings are: "...by any genuine excuse."In another narration the wordings are: "They are your partners in reward."[Al- Bukhari].

وعن جابر رضي الله عنه قال‏:‏ كنا مع النبي صلى الله عليه وسلم في غزاة فقال‏:‏ ‏ "‏إن بالمدينة لرجالا ما سرتم مسيرًا، ولا قطعتم واديًا إلا كانوا معكم حبسهم المرض‏" ‏

sunnah.com