Indra Nooyi is leaving PepsiCo in good shape.
During 24 years at the company, half of which she spent as CEO, she acquired big-name brands, invested in healthy products and fended off a call to split up Pepsi's food and beverage businesses.
Nooyi, who announced Monday that she will step down in October, leaves behind a nimbler company, more responsive to the evolving tastes of its customers.
"She recognized at a pretty early stage that consumer trends were changing," said Duane Stanford, the executive editor of Beverage Digest, a trade publication. "She has had a very defined strategy, and she's been able to keep an eye on the future."
As senior vice president for strategy, Nooyi was key to Pepsi's 1998 acquisition of Tropicana, the orange juice company. She also spearheaded a merger a few years later with Quaker Oats, which makes oatmeal and Gatorade.
Gatorade in particular has been a bright spot for the company. The brand now controls about 75% of the US sports drink market, according to the research firm Euromonitor International.
Stanford said those purchases also set the stage for Pepsi's continued expansion. The company has since picked up small, trendy brands, like Naked juice, Kevita kombucha, and Sabra, which produces hummus and other Mediterranean foods.
Nooyi also made big hires that tipped her commitment to healthier eating. In 2007, she hired Pepsi's first chief scientific officer, Mehmood Khan, and its first director of global health policy, Derek Yach.
Yach, who has since left Pepsi and now runs the Foundation for a Smoke-Free World, said Nooyi was remarkably committed to fighting obesity.
"She was the first person to truly acknowledge that companies needed to change," he said. "She understood that very deeply, and started putting into place a couple of key elements that all companies now accept as normal."
At a time when many food companies were researching and developing new flavors, Yach said, Pepsi was creating recipes that were lower in salt and fat. The company also experimented with non-sugar sweeteners.
Morningstar analyst Sonia Vora said the move helped Pepsi remain relevant among healthier eaters.
Pepsi now has three food categories: Good For You includes the healthiest stuff, Better For You includes diet drinks and lower-calorie snacks, and Fun For You includes traditional junk food.
"The shift toward a 'Better For You' portfolio has been probably the key mark of Indra Nooyi's legacy at Pepsi," Vora said.
The health push hasn't always worked. Neil Saunders, a managing director of GlobalData, pointed to a failed attempt to change Diet Pepsi's recipe as one misstep.
In 2015, Pepsi replaced the artificial sweetener aspartame with a sucralose blend in some diet drinks, including Diet Pepsi, to address health concerns. But people didn't like the new recipe, and after just 10 months, Pepsi brought aspartame back.
The company also had to adjust overly ambitious goals for healthy products.
In 2010, Pepsi said it wanted to triple sales of those offerings to $30 billion by 2020. By 2017, sales had grown only 75%, to $17.5 billion.
Pepsi is now aiming for sales growth of healthier products to outpace traditional drinks and snacks by 2025.
Nooyi's other legacy will be a pledge to keep Pepsi's food and drink divisions as one company, Vora said.
She faced pressure to do otherwise. In 2014, activist investor Nelson Peltz called for Pepsi to spin off its snack business. He argued that the beverage side was holding food back, and that Nooyi was neglecting Pepsi's core products by focusing on Good For You items.
Nooyi held firm.
"What we are deploying is sensible strategies," she told CNBC that year. "The products work together."
Pepsi declined an interview request.
Vora thinks Nooyi was right. She said that keeping the businesses together makes it easier and less expensive for Pepsi to market and sell both types of products.
Soon, all eyes will be on Nooyi's successor, Ramon Laguarta. Vora said she thinks the 22-year Pepsi veteran will continue in Nooyi's footsteps, maintaining a focus on healthier products.