M.R.
I didn't find that it worked much, if at all. I would look for what is causing the constipation and discomfort, and not change that, instead of treating the symptoms. Sounds like it's almost certainly the formula, so perhaps a different brand (like others suggested.)
Constipation can often be from the high amounts of iron in formulas, but it is hard now to find low-iron formulas. My children couldn't tolerate Earth's Best very well, which was disappointing b/c I like the company and that it's organic.
It can be hard to find a formula that won't cause the upset stomach and pain, but it is totally worth it when you do. Good Luck!