I tried this on the worksheet both on it's on and by adding it to my code and it does nothing.

Now the values being used come from cells that I used Text to Columns on. I have no idea if that makes any difference or not. But I have used this code in other macros and it was fine.