Hi! Welcome to the forum!
I think as long as you keep an eye on him for sneezing he will be fine. Serious respiratory issues might come from prolonged exposure but if he only had it for a few weeks and it was removed as soon as he started sneezing you've done everything right. Finding the right sand can be tricky in a pet shop (between chinchillas and reptiles also needing sand!) but children's play sand is perfect for hamsters, it just needs dried out in the oven for a bit so it's not damp.