Instead it amassed a small community of online buyers, similar to a direct-to-consumer startup, and gleaned feedback through those buyers to strategize the product's launch. What accelerated the process was P&G's decision -- unusual for the company, particularly for a large-scale product -- to rely on W.M. Barr for the technology behind Microban 24. P&G declined to discuss terms of the deal.

Those moves cut about a year off the time it took to get Microban 24 into stores, P&G said. Mr. Moeller, the finance chief, said the company's nimbler operations allowed it to meet demand that was 50% to 60% higher than it anticipated. He said the company originally planned for Microban 24 sales in the first year of roughly half of what the company now anticipates.

"The degree to which we've been able to bring on new supply and do that very quickly is symptomatic of the agility that our supply chain now has, " he said.

Saving Shaving

Another change P&G executives made before the pandemic hit was to tackle the many problems in its Gillette shaving unit. They did it by mining its trove of consumer data rather than make the kinds of splashy acquisitions that rivals have chased.

The Gillette unit, one of its biggest and most profitable businesses, had for years suffered falling razor sales. The brand fell out of favor among men who were both shaving less and ditching the brand in favor of lower-priced upstarts such as Dollar Shave Club and Harry's.

P&G clawed back sales over the last several years as the company cut razor cartridge prices to regain customers. It also reacted to internal data showing renewed interest in vintage razors, beard grooming and sensitive skin. The unit introduced an old-school safety razor and new products designed for men with beards -- sold under the brand King C Gillette, a nod to Gillette's founder -- and a razor for men with sensitive skin.

Sales are picking up while rival razor brands struggle. In the most recent quarter, the unit's sales rose 5%, the biggest increase in years.

"A lot of people have made these big investments" to capitalize on consumer trends by leveraging data, said Edward Jones analyst Parveen Singh. "But P&G has done better using its own information."

P&G still faces questions. The company and its rivals are beginning to offer discounts and deals again as supplies begin to replenish. Executives say they are concerned that customers lost amid product shortages may not return, and they are pumping up advertising spending to lure them back.

It is unclear whether consumer spending will hold up and P&G's brands will hold their ground as the fallout from another round of pandemic-related shutdowns in Europe and elsewhere ripple through the global economy.

Mr. Taylor said P&G is better prepared in 2020 for that scenario than during the 2008-09 recession. The company's offerings cover a broader price range, and its brands can respond to consumer cost-cutting with tailored marketing and packaging, he said.

"That's not to say it can't happen," he said, about a shift toward cheaper products. "We fully expect that if this gets longer and deeper, people will have to make a choice."

Write to Sharon Terlep at sharon.terlep@wsj.com

(END) Dow Jones Newswires

11-13-20 1015ET