Here's the problem as I see it.
You have this code
Then the rest of your macro operates on the variable CSPCells which is a range (a cell).
So what does this next code do?
if the value in CSPCells is null, then set the activecell to null? Why are you doing that - I don't understand. There is no relationship between the cell referenced by CSPCells and the active cell. Then the second part "else" is saying, if the value in CSPCells is not null, then select it. Once again, why would you want to select it? You don't need to select it to operate on it.
I don't really know, and you will need to test it, but my suspicion is that because you have the line CSPCells.Select, the "selection" has been changed. So if you go back to the first bit of code I posted above "For Each CSPCells In Selection.Cells", your "selection.cells" has now changed.
I suggest you just comment the code out and see if that fixes the problem. If it doesn't there is no need to change it.
If you want to skip over blank cells in your range, just wrap an if statement around all your code. ie
Bookmarks