The 63-year-old, name only as John by South Yorkshire Police, has been found, a spokesman said.
He was last seen on Friday at around noon in the Cantley area of the town.
However, he is thought to have arrived in Edinburgh by train yesterday.
A spokesman said: “Thank you so much to everyone who shared any appeals for us while he was missing.”