NEW YORK (AP) _ CBS tied NBC in the ratings last week with a big assist from the miniseries, ''If Tomorrow Comes,'' but no help at all from prime-time college basketball, figures from the A.C. Nielsen Co. showed Tuesday.

The second and third parts of ''If Tomorrow Comes,'' Sidney Sheldon's story about a glamorous jewel thief, registered among Nielsen's first 15 shows for the week of March 17-23, but the NCAA Tournament regional semifinal broadcasts both ranked in the bottom 15 programs.

''If the basketball had done a bit better, we would have won the week,'' said Michael Eisenberg, CBS' research director.

For the week, CBS and NBC averaged 16.2 ratings, while ABC had a 14.3. After 26 weeks in the 30-week prime-time season, NBC leads with an average rating of 17.8 to CBS' 16.8 and ABC's 15.0.

A national ratings point equals 859,000 homes with television.

NBC had four shows in the Top 10, all from its popular Thursday comedy block. ''The Cosby Show'' was first with a 36.4 rating and the debut of ''All Is Forgiven'' finished seventh. ''Family Ties'' was second and ''Cheers'' third.

CBS placed three shows in the Top 10: ''60 Minutes'' in fifth, Part 2 of ''If Tomorrow Comes,'' in sixth, and its Sunday movie, ''Dallas: The Early Years,'' in a tie for ninth with ABC's ''Dynasty.'' ABC also scored with its Tuesday comedies: ''Who's the Boss?'', in fourth, and ''Growing Pains,'' in seventh.

The third part of ''If Tomorrow Comes'' ranked 12th. All three installments, including the first part from the week before, averaged a 22.0 rating, placing the miniseries third behind ABC's ''North and South'' and CBS' ''Cain & Abel'' among multi-part productions this season.

Prime-time basketball ratings were down from last year. The Thursday match- ups of Georgia-Louisiana State and North Carolina-Louisville had a 10.2 rating, compared to last season's 12.0. The Friday games, Duke-DePaul and Kansas-Michigan State, had a 10.6, down from last season's 10.8.

Eisenberg said this season's prime-time games didn't have the major star appeal that Georgetown had with Patrick Ewing and St. John's had with Chris Mullin last season.

ABC's Thursday lineup and NBC's ''Hill Street Blues,'' programs not normally high-ranked, all reached the second 10, in part because of CBS' NCAA basketball competition. ABC's ''The Colbys'' was 17th, NBC's ''Hill Street Blues'' was 18th and ABC's ''20-20'' was 20th.

A regular episode of ''Dallas'' on CBS ranked 14th, tying it with a regular episode of NBC's ''Miami Vice.'' On Sunday night, the movie about the early generation of ''Dallas'' beat the rerun of ''Miami Vice's'' opening two-hour episode, which ranked 26th.

On Monday, CBS' ''Kate & Allie'' and ''Newhart'' were on an hour earlier and took some momentum from NBC's new comedies, ''You Again?'' and ''Valerie,'' which had been winning the 8 to 9 p.m. EST time slot. ''Newhart'' was 13th and ''Kate & Allie'' 16th, while ''Valerie'' was 28th and ''You Again?'' 33rd.

''Our comedies didn't hold up well,'' said Gerald Jaffe, NBC's vice president for research projects.

Eisenberg said the success of ''Kate & Allie'' and ''Newhart'' in the earlier hour showed the strength of the shows and some ''probable early tune- in for 'If Tomorrow Comes.'''

CBS new Wednesday comedies, ''Fast Times'' and ''Tough Cookies,'' which had been performing poorly, picked up some viewers when NBC's ''Bop Hope's Command Performance in Sweden'' pre-empted the normally high-rated ''Highway to Heaven.'' ABC's competition, ''MacGyver,'' won the time period, ranking 22nd, while ''Command Performance'' was 25th, ''Fast Times'' 31st and ''Tough Cookies'' 45th.

''This is the best those comedies have done this season,'' Eisenberg said. '''Highway to Heaven' is popular with old and young viewers, and the young viewers apparently were not interested in Bob Hope.''

Among the bottom five shows, CBS' ''Trapper John, M.D.,'' ABC's movie, ''Triplecross'' and ABC's ''The Redd Foxx Show'' tied for 59th, CBS' NCAA basketball was 62nd, NBC's ''Punky Brewster'' 63rd, ABC's ''The Fall Guy'' 64th and ABC's ''Ripley's Believe It or Not'' 65th.

In the evening news competition, the ''CBS Evening News,'' which suffered some pre-emptions on the West Coast on Thursday and Friday because of NCAA basketball, still led with a 12.3 rating. The ''NBC Nightly News'' averaged a 12.2. ABC's ''World News Tonight'' had an 11.3.