All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
The report with this very wording is definitely not a Hadeeth and we could not find any evidence that it is attributed to ‘Umar ibn Al-Khattaab . However, a part of the report is actually narrated from the Prophet, sallallaahu ‘alayhi wa sallam, and some of the Companions, namely, the statement: “If something is meant to go elsewhere, it will never come your way.” It is part of a report narrated by Abu Daawood, Ahmad, Ibn Maajah, and others. The version of the report narrated by Abu Daawood is classified as a Mawqoof report (i.e. a Hadeeth narrated by a Companion in which the chain of narration does not reach the Prophet ) and attributed to ‘Ubaadah ibn As-Saamit . It reads, “O son, you shall never relish the genuine taste of faith until you know that whatever has befallen you could not have passed you by; and whatever has passed you by could not have befallen you.”
The version of this report which is cited in Musnad Ahmad is classified as a Marfoo‘ Hadeeth and attributed to the Prophet, sallallaahu ‘alayhi wa sallam.
A similar version of that report is cited in Al-Mustadrak as well. It reads, “Know that whatever passed you by could never have befallen you, and that whatever has befallen you could never have passed you by.”
It has been reported in Saheeh Ibn Hibbaan on the authority of Ibn Ad-Daylami that he said, “I went to Ubayy ibn Ka‘b and said to him: 'I am confused about the Divine Decree, and I fear for my religion and my affairs, so tell me something that may dispel it (the confusion) from my heart.' He said, 'If Allaah were to punish the inhabitants of His heavens and of His earth, He would do so and He would not be unjust with them. And if He were to have mercy on them, His mercy would be better for them than their own deeds. If you had the equivalent of Mount Uhud which you spent in the cause of Allaah, that would not be accepted from you until you believed in the Divine Decree and you know that whatever has befallen you could not have passed you by, and whatever has passed you by could not have befallen you; and that if you were to die believing anything other than this, you would enter Hell.”
He (Ibn Ad-Daylami) added, “Then, I went to ‘Abdullaah ibn Mas‘ood, and asked him (about this) and he said something similar to what Ubayy had said. Then, I went to Huthayfah and asked him, and he said something similar to what they had said. Afterwards, I went to Zayd ibn Thaabit and asked him and he said something similar to what they had said." [Ibn Hibbaan] Shu‘ayb Al-Arnaa’oot underlined that this Hadeeth's chain of transmission is strong.
As for the other parts of the report, we could not find their particular sayer; however, their meaning is acceptable and sound. It revolves around the belief in the predestination and decree of Allaah and that everything happens by the Will of Allaah and that no one can ever escape what He decrees.
Allaah Knows best.