For the wrath of man worketh not the righteousness of God. If you pay close attention you will notice the most foolish people you will ever meet are those who love to speak but hate to listen. Attitude is so very important when confronting someone about his sin. Shamefully, we usually just observe the sin in a brother or sister and then just turn our noses up to them and sort of give them the cold shoulder and treat them as if they are sinful and inferior to our level of spirituality. I think this is often more preferable and feels better than first examining ourselves, and certainly much easier than confronting them.
Attitude is very important when rebuking someone, but so is action for it comes next.
We are not to go and complain and talk about them to others behind their back, but we are to go to them alone and hope to restore our relationship with them. Now if at that time they do not hear us, then we are to return with witnesses in the attempt again to get the person to see their sin and repent. If they do not, then the matter is to be brought before the church, and if the person absolutely refuses to forsake the sin then they are not to be included in fellowship. This is also an attempt to get the person to forsake the sin while keeping the church pure and free from corruption. And the passage confirms that when we make a decision in this way, whether it be to loose or to bind, that heaven is in agreement with our action and decision.