My two year old was vomitting on Sunday and had yellow diarrhea, it is now solid but still bright yellow. He barely has eaten for a week and ihas gas?

The color of the. stool is normal for a diarrheal illness. It sounds like he has had a virus which is resolving. The virus causes the intestines to not be able to absorb properly temporarily, which causes that color. The gas is also normal as a virus is resolving. Try as best you can to get him to eat more (even if he has diarrhea) and he will get better faster. Please consult with his doctor if he isn't.