NEW YORK (AP) _ Months of hype about ``Ellen's'' coming-out episode paid off handsomely for ABC in the ratings as curious viewers turned it into a television event.

The hour-long program scored a 23.4 rating and 35 share in Nielsen Media Research's overnight measurements _ more than twice its usual audience and along the lines of a typical episode of ``ER,'' the year's top-rated show.

Advertisers tailored special messages for ``Ellen'' _ and paid special prices set down by ABC. Chrysler, a regular ``Ellen'' sponsor that pulled out of this episode, had to set up a phone line to deal with the calls about its decision.

At ``come out with Ellen'' parties across the country, people cheered when star Ellen DeGeneres stammered, ``I'm gay,'' into an airport microphone during the show's climactic moment. DeGeneres watched at a private party in Beverly Hills, Calif.

The ratings indicated that 35 percent of the nation's TV sets on at the time were tuned to ``Ellen.'' In cities like Boston and San Francisco, it was 45 percent. ABC estimated 42 million people watched all or some of the show.

This compares with ``Ellen's'' average rating of 9.6 with a 16 share. The show had sagged to 37th place in the ratings this season, with only two-thirds the audience it had two years ago.

ABC pronounced itself pleased with the ratings, and one analyst said it was much better than she expected.

``ABC was very, very successful in positioning this as not simply a gay television show but as a television event,'' said Betsy Frank of Zenith Media in New York City.

The ratings don't put ``Ellen'' anywhere near the highest-rated show ever, the final episode of M.A.S.H, which had a 60.2 rating and 77 share in 1983. With cable, television viewers have far more choices today.

Still, it was ABC's highest rated program of the year, and couldn't come at a better time for the slumping network.

ABC declined to say how much it was charging for commercials on the show, but people familiar with the matter said some commercials were sold for $300,000 to $350,000 for 30 seconds.

That was well below the $500,000 price commanded by shows like ``Seinfeld'' and ``ER'' but above the $170,000 price ``Ellen'' reportedly commanded before the season started.

One advertisement for a home HIV test was tailored specifically for ``Ellen.'' Home Access Health Corp.'s ad ran in New York, Chicago, Los Angeles, Washington, San Francisco and Baltimore.

It began with the text, ``Hey everybody, we came out this year, too.''

Volkswagen ran a new ad featuring two men driving in one of their cars. VW spokesman Tony Fouladpour said the men were supposed to be buddies, not gay lovers.

People calling for Chrysler Corp. consumer information this week were given a specific phone line if they wanted to talk about the company's decision not to advertise on ``Ellen'' Wednesday night.

``It was a matter of efficiency to weed out the opinion calls from those we need to respond to about our automobiles and trucks,'' said spokeswoman Megan Giles. She said the calls ``have been a wash'' on the issue but could not provide any numbers.

The company has not decided whether it will advertise on the two remaining ``Ellen'' episodes this television season.

The show was also stocked with movie ads. Richard Kostyra, who heads the media buying group Media First International, said movie companies generally seek big, youthful audiences and are not worried about controversial program content.

Next week's ``Ellen'' episode, which features homosexual rights activist Chastity Bono, will be about Ellen DeGeneres' character telling her parents she is gay. On the season's final show, Ellen tells her boss.

The network has not made a decision about renewing the show for another season, but it is expected back.