(Updated from 1:06 a.m. EDT)

NEW YORK ( TheStreet) -- Yahoo! ( YHOO) beat profit targets for the third quarter, but sales remain stubbornly flat despite rejuvenation efforts.

Yahoo! shares were at $17.96 in premarket trading Wednesday. The stock rose 5.1%, or 87 cents, to $18.04 in after-hours trading Tuesday after closing at $17.17.

The No. 2 Internet search shop posted adjusted earnings, excluding one-time items, of 13 cents a share, up from 9 cents in the year-ago period and well above the 7 cents analysts had targeted, according to Yahoo! Finance.

Sales less traffic acquisition costs for the quarter ended last month were $1.13 billion, down 14% from the $1.33 billion level last year, but in line with analysts' estimates calling for revenue of $1.12 billion.

"With new products like Yahoo! homepage, our brand revitalization campaign and expansion in the Middle East through Maktoob.com, our execution is improving and we're focused on what we do best -- being the center of people's online lives," CEO Carol Bartz said in a press release Tuesday.

In July, Yahoo!'s second-quarter sales disappointed with a 15% year-over-year decline, and Bartz warned then that there would be higher expenses as the company started "re-architecting and globalizing" to make its sites more open, scalable and mobile-friendly.

Yahoo! said weak sales were led lower by a 19% drop in search ad sales. Yahoo! wasn't seeing the upswing in search revenue that Google ( GOOG - Get Report) reported last week and is likely losing business to Google and Microsoft's ( MSFT - Get Report) Bing.

Display advertising was a slight bright spot declining only 8% year-over-year, that was a big improvement from the 12% drop in the second quarter.

Looking ahead at the fourth quarter, Yahoo! says it expects gross sales to be in the range of $1.6 billion to $1.7 billion. The midpoint of $1.65 billion is in line with analysts' expectations for a top line of $1.64 billion.

CEO Carol Bartz was unable to attend the earnings conference call with analysts Tuesday. Yahoo! CFO Tim Morse hosted the call alone. Morse highlighted some of the key areas for Yahoo! during his presentation.

On costs, for example, Morse said Yahoo! spent $18 million on its new branding campaign that launched late last month. He said the company would spend about $45 million on advertising and marketing of the company's brand this year.

On the Microsoft search partnership, Morse said he expected the deal to close in early 2010. After the close, Morse said he expected Yahoo! to "transition in one or two markets next year."

According to the agreement, Yahoo! searches will be handled by Microsoft's Bing search engine, with both companies dividing the revenue. The two Internet giants have plans to combine search forces to better compete against Google.

Lacking a big profit shortfall and showing stabile but not growing sales, Yahoo! shares rose 65 cents, or 4% to $17.82.