The ups and downs of the last year at Hewlett-Packard will be a case study examined by business schools for a long time to come, Deborah Nelson, the company’s chief of staff for global sales and enterprise marketing, predicted at the recent Wharton Women in Business conference.

Last August, former CEO Mark Hurd resigned amid a sexual harassment probe and allegations about inaccurate expense reports. He was replaced by Leo Apotheker, former CEO of business software company SAP. In September, Apotheker was out, and the HP board tapped former eBay CEO Meg Whitman to restore investor confidence in the company.

During a keynote talk at the Wharton conference, Nelson was asked if the culture at HP changed depending on whether a man or a woman was occupying the CEO suite. In her response, Nelson said that what makes a leader a good fit for a particular company isn’t just a question of gender, and she used the recent upheaval at HP as an example.

“For a CEO, it’s about timing and having the right skill set for the right time for leading the organization,” she noted. “I think [Whitman] is really going to be the right leader at the right time. It’s less about her being a woman [and more about being] very decisive, very open to lots of different ideas, and she really listens. She’s a great communicator.”

In a recent KnowlegdeToday post about the turnover at HP, Wharton management professor Lawrence G. Hrebiniak echoed Nelson’s comments, suggesting that Whitman was hired “because of her communication skills, personality, her rapport with HP board members and her experience. She will pursue the same strategy Leo Apotheker offered — divest the PC business, focus on software and services — so it’s not Leo’s strategy the board didn’t like. The board just didn’t like Leo, just like SAP’s board didn’t like him a year ago.”

Nelson said HP’s recent history has been “a really good example of bad communication. It’s not about fixing HP’s culture. HP doesn’t need to be fixed. We needed to fix our CEO.”

But she stressed to attendees at the conference that they need to prepare to be adaptable to working for leaders with differing management styles and personalities. “Sometimes, you’ll have a boss who is a strong sponsor for you. Other times, you’ll have a boss who is not a strong sponsor. When I’ve had a boss who is a strong sponsor, what that provided was the right environment to take additional risks and really stretch myself. That’s been great, but you don’t always get to pick your boss, so figuring out how to get along in all sorts of situations and being confident are really critical.”

When it comes to managing others, Nelson again noted that gender is not the most critical factor in the character of the relationship. “It’s more about the team and if they have respect for you because you’re making the right decisions.”

Nelson recalled a situation where she was put in charge of a team of employees who all had 10 to 20 years more experience than she. “They were all deep domain experts with software. I thought of where the areas [are that] I could help them with. I could make sure they have great research available to them, I could make sure they are linked with R&D. I told them that I’m not going to tell them anything about software that they don’t already know. That’s where being approachable … was really helpful because they felt they could come to me.”