One More Time,
Stick with the context of the passage in question. It is not referring to those who outwardly claim Christ while still in the flesh. It is speaking of a specific place & time when they will stand before God. I am answering the question within the context of the text. Of course there are those who claim Christ but do not have an understanding of the Gospel, but that is not the point of the verse.
How about this, no one will claim Christ when standing before God & be condemned. These persons did not claim Christ, they claimed their own works. How hard is that to understand? I guess it's pretty hard when you're set on injecting your own interpretation into the text.
Verily, verily, I say unto you, He that heareth my word, and believeth on him that sent me, hath everlasting life, and shall not come into condemnation; but is passed from death unto life. (Joh 5:24)
Michael is correct, look at the scripture in context.
Mat 7:21 Not every one that saith unto me, Lord, Lord, shall enter into the kingdom of heaven; but he that doeth the will of my Father which is in heaven.
22 Many will say to me in that day, Lord, Lord,
have we not prophesied in thy name? and in thy name have cast out devils? and in thy name done many wonderful works?
23 And then will I profess unto them, I never knew you: depart from me, ye that work iniquity.
How obvious does it have to be? These folks were boasting of their works. They directly ask have they not "done many wonderful works?". It couldn't be more obvious.
Works are no assurance of salvation. A person must come to Christ and trust him only to save them. A person who has done this can know and have assurance of salvation.
Faith is not some mysterious, magical thing. You can know when you trust someone for a certainty. If your neighbor asked to borrow your car and you gave them the keys and they drive off, did you trust them? YES.
In the analogy I earlier gave of the firemen shouting for you to jump from the skyscraper promising to catch you, if you jumped did you trust them? Of course! There is no doubt about it whatsoever. You can know when you have believed, you can know when you truly trusted.
I know I will get an argument from the Calvinists, but Jesus himself shows what trusting or believeing is, when he gave up the ghost on the cross.
Luke 23:46 And when Jesus had cried with a loud voice, he said, Father,
into thy hands I commend my spirit: and having said thus, he gave up the ghost.
Jesus did not have to die on the cross, he is God. He could have easily come down and killed those who attempted to crucify him. He WILLINGLY died on the cross, he GAVE UP the ghost. He entrusted (commended) his spirit into his Father's hands, depending and relying on the Father to raise him from the dead. This is trust, this is believeing. It is a ceasing of all effort to save one's self and placing your salvation in Jesus's hands, depending and relying on him only to save you as he trusted his Father to raise him from the dead.
It is like jumping off the building. Once you do that you are helpless and completely dependent on those firemen to catch you as they promised.
You can know if you have trusted Jesus. You can come to him in your heart and simply ask him to save you, and depend on him to fulfill his promise.
John 4:10 Jesus answered and said unto her, If thou knewest the gift of God, and who it is that saith to thee, Give me to drink;
thou wouldest have asked of him, and he would have given thee living water.
Asking Jesus to save you is trusting, it is believeing. It is placing the matter in his hands and depending on him alone to save you. Jesus does not need our works, he does not need our help at all. He is fully able to save all those who come to him and trust their souls to him.
Those persons in Matthew 7 were depending on their own works, they were not depending on Jesus alone to save them.