Marc Benioff, the co-founder and chief executive of Salesforce, was riding high a couple of years ago. His cloud software company had weathered the financial crisis, revenue was up, and the stock was at a record high.

But as Mr. Benioff pondered his company’s evolution, he had cause for concern.

“I was in meetings with managers and they were all men,” he said. Silicon Valley’s notorious lack of gender diversity, he realized, was a problem at Salesforce too: “I was really worried that there was something wrong with the company.”

Hoping to change the ratio, Mr. Benioff started what he called the Women’s Surge in 2013. The goal was to achieve 100 percent equality for men and women in pay and promotion, and to make sure that at least a third of all participants at any meeting were women. His efforts received a boost when Sheryl Sandberg, the chief operating officer of Facebook, published “Lean In,” bringing more discussions about gender issues to the national stage.

As a first step, Mr. Benioff asked managers across the company to identify their top executives, who would then receive additional leadership training. In divisions where mostly men were nominated, Mr. Benioff told the managers to come back with a more diverse list.