Just say:
Alhamdu lillaahi 'alaa kulli haal.
Praise is to Allah in all circumstances.
Reference:
Ibn As-Sunni, 'Amalul-Yawm wal-Laylah, and Al-Hakim who graded it
authentic 1/499. See also Al-Albani, Sahihul-Jami' As-Saghir 4/201.
“They plan and Allah also plans. And Allah is the best of planners.” (Surah Imraan, verse 54)
It may be that we like something that is bad for us and dislike something that is good for us...Only Allah knows and we do not. So InshaAllah when thnigs doesn't go our way or as planned, know that there is wisdom behind it... just have sabr and say alhamdulillahi A'laa kulli haal...it makes life easier!