On a technicality, everyone is compatible with everything.
The only question is how much. How much of it can they handle?
As we saw with Danzo and others, it varies between people (Yamato could only handle a few cells, Danzo could take almost an entire arm, Madara could take a full face).
The question is why. I think its has to do with will power (since the cells of Hashirama also carry his own will power, which can take over a body, as Danzo noted) and actual natural affinity (like, with elements).
So Yamato just so happened to be the only one, in the group of Orochimaru, who could handle the specific amount he gave them. Why? Natural affinity is my guess