Most of the time, no. In fact, many times, switching to formula can make colic worse. Colic — the term for extended periods of unexplained crying or fussy behavior — can have several different causes. We now know that many babies who would have been called "colicky" in the past in fact suffer from GERD (gastroesophageal reflux disease or "reflux") or have a sensitivity or allergy to something in mom's diet. Both of these conditions can become worse when babies are switched to formula.
Babies with reflux have trouble digesting. Stomach contents back up into baby's esophagus, causing irritation and pain. Because formula takes longer to digest than human milk, it sits in baby's stomach for a longer time. That allows it to reflux back into baby's esophagus for a longer period of time, causing even more irritation and pain. The best way to control reflux, aside from medication, is to provide frequent, small, easily digested, meals — exactly what breastfeeding provides.
Babies that have any sensitivity to a particular protein in mom's diet often fare poorly on formula too. The most common protein some babies react to is the protein found in cow's milk. If this is eliminated from mom's diet, baby will then do quite well on breast milk. However, most formulas on the market are cow's milk-based formulas. A baby with cow's milk protein sensitivity will react quite badly to formula and can become very ill. The other commonly found formulas on the market are based on soy, but 50 percent of babies who are sensitive to cow's milk are also sensitive to soy. These babies need to be placed on a special hydrolyzed (or predigested) formula in which the proteins are broken down to the point where baby's body no longer reacts to them. These formulas are extremely expensive and generally have a very unpleasant taste and smell.
Most babies with colic do much better on their mother's milk than on any of the formulas, so your best bet is most likely to continue nursing.