Mishkat al-Masabih 183
Ibn ‘Abbas reported God’s messenger as saying, “Things are of three categories:
a matter whose right guidance is clear, which you must follow; a matter whose error is clear, which you must avoid; and a matter about which there is a difference of opinion, which you must entrust to God.” 

Ahmad transmitted it.
وَعَنِ ابْنِ عَبَّاسٍ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: " الْأَمْرُ ثَلَاثَةٌ: أَمْرٌ بَيِّنٌ رُشْدُهُ فَاتَّبِعْهُ وَأَمْرٌ بَيِّنٌ غَيُّهُ فَاجْتَنِبْهُ وَأَمْرٌ اخْتُلِفَ فِيهِ فَكِلْهُ إِلَى اللَّهِ عَزَّ وَجل)
رَوَاهُ أَحْمد