Microsoft appoints new CFO from Office division

She replaces Peter Klein, who announced his departure three weeks ago. He has been CFO for four years.

Hood, 41, joined Microsoft Corp. in 2002. Before that, she worked at Goldman Sachs. She has a master’s degree in business administration from Harvard University.

Klein is staying with the company until June to help keep the transition smooth. Klein says he’s leaving to spend more time with family.

The CFO transition comes as the software company is battling a steep decline in consumer PC sales. It’s trying to get its software into more tablets and smartphones, which are drawing consumer dollars away from PCs.