When Steve Carell, and his alter ego Michael Scott, resigned from “The Office” last season, it left a void for the show’s producers that they knew would be challenging to fill.

“There was so much love for Steve, I guess my biggest concern was that the new person wouldn’t get a chance,” says scribe Paul Lieberstein, who plays Toby on the show.

It’s the same concern that “Two and a Half Men” creator Chuck Lorre likely had when the show’s producers and network decided to continue last year without their mercurial lead, Charlie Sheen, following an ugly public battle.

Not only does finding another anchor for a primetime show cause hand-wringing for producers, it’s tough for the new actor who has old shoes to fill. Change invites the inevitable comparisons — something every actor dreads — but it can also make for a difficult adjustment for the new actor going into a close-knit set.

“Moving into somebody else’s house is a scary thing,” Ashton Kutcher told TV Guide shortly after his high-profile debut on “Men.” “Who knew what the dynamic would be and how everybody would feel? I wanted to make sure it was comfortable for everybody else and for myself.”

Although both shows lost their leads for very different reasons, they’re just two of dozens of shows in TV history that have introduced leads or replaced actors well into their runs: the two Darrens on “Bewitched,” Kirstie Alley replacing Shelley Long on “Cheers” and Jimmy Smits stepping in for David Caruso on “NYPD Blue.” Even Sheen once replaced Michael J. Fox on “Spin City.”

The big difference with “The Office’s” Ed Helms, who ultimately stepped in for Carell, is that he had the benefit of being an established actor on set playing an established character, Andy Bernard, on the show. Even so, Lieberstein says he wanted a buffer between Carell’s exit and introducing the next boss, which is why the end of last season featured several guest (boss) stars, including Will Ferrell.

“(The process) felt very real. There’s a search from the outside then we promoted from within,” Lieberstein says.

But he adds that they discussed the concept behind the role extensively before Helms became the official head honcho.

“We talked quite a bit about how Andy would be different from Michael. I think that was one of his biggest concerns,” Lieberstein says.

While promoting a character from within the ensemble seems like an easy decision, Lieberstein says it also offered a welcome challenge for the writing staff.

“Change is fun for a writer,” he says. “After seven years, it was nice to have to stretch.”

The by-product of that stretching was greater visibility for the rest of the ensemble and experimentation with other character pairings.

“We also spread storylines around,” Lieberstein says. “We pushed forward what people already liked and focused on the show that they already knew.”

In contrast, “Two and a Half Men” could almost be considered a new show with the addition of Kutcher. Co-star Jon Cryer told the AP the show’s scribes transitioned the scripts seemlessly.

“The writers had an enormous challenge and you’ll see they handled it beautifully. Change is often shocking, but it’s so true to the show,” Cryer said. “Sometimes stuff you don’t see coming happens in life, and in that respect it was very true to life.”

Despite joining a show that was a comedy juggernaut, Kutcher told “Entertainment Tonight” shortly before his debut that he wasn’t feeling the pressure.

“This show has been enormously successful for a long time. There’s a massive crew that actually make it and give it the value that it has. I’m a tiny piece of that puzzle,” Kutcher said.