My daughter was found to be lactose intolerant while we were still in the hospital after her birth. I gave her soy formula, per the doctor's instructions. She did fine on it. She drank soy until she was almost 2.
I also spent several years living next to a family with one child who was allergic to cow's milk. It was a rural area, so they were able to keep goats for her to have the milk. She had no problem with goat milk.