I know this won't work for everyone but, if it only helps one, it's worthwhile. I was diagnosed with IBS some years ago and suffered from diarrhoea, bloating, gas, occasional constipation. The doctor couldn't offer much advice as I wasn't overweight, did some exercise, didn't smoke, drank only a little, and didn't have much stress in my life (I sound like a paragon of virtue, which I'm obviously not!).
Finally a friend's daughter was diagnosed as being coeliac and had to give up everything with gluten in it, so I thought, why not try? A blood test for coeliac disease proved negative but I thought that, even if I wasn't allergic to gluten, I could still be intolerant to it. It took a couple of weeks for the symptoms to go away (after excluding wheat, rye, barley, oats and ALL the processed products that contain these) but I haven't looked back.