And you will seek Me and find Me, when you search for Me with all your heart.
- Jeremiah 29:13
Sometimes we think a prayer wasn't answered when, in effect, it was. It just wasn't answered in the affirmative.
When we ask God for something and He says, "No," then it means no. So if we want our prayers answered in the affirmative, then we need to align ourselves with God's will.
God answers prayer in three ways: yes, no, and wait. Sometimes He wants you to grow through your challenge. The apostle Paul came to God with a prayer to remove a physical infirmity. We don't know what it was, but most commentators believe it was either a disability or an injury he suffered as a result of his ministry. Clearly there were many occasions this could have happened, because Paul was beaten, whipped, shipwrecked, and even put in prison and left for dead on one occasion. You name it, and Paul pretty much went through it.
Whatever the infirmity was, it bothered Paul. So he asked God to take it away. But God said, "My grace is sufficient for you, for My strength is made perfect in weakness" (2 Corinthians 12:9). Sometimes God does not take our adversity away, but He wants us to grow through it.
Then there was Moses, who wanted to see the Israelites delivered from bondage in Egypt. He didn't wait on God, but instead took matters into his own hands and killed an Egyptian guard. When the Pharaoh found out about it, he effectively put out a contract on Moses' life, and Moses went into exile for 40 years. Moses had the right idea, but his timing was way off.
Sometimes God will say, "Yes," sometimes He will say, "No," and sometimes He will say, "Wait." But we can be assured that when we passionately cry out to God by faith, He hears us.