CNBC's Jim Cramer on Friday called Wells Fargo's selection of veteran banking leader Charles Scharf as its new CEO a "brilliant move."

"This was a job that was offered to Charlie a while ago. And Charlie didn't want to take it," Cramer said. "But I think the opportunity was just too great, was my understanding."

Wells Fargo on Friday said Scharf will assume the CEO role at the bank, effective Oct. 21. The announcement ends a six-month search in which it seemed nobody wanted take on the challenges of the scandal-ridden bank.

Cramer congratulated Wells Fargo on finally filling the post. "As President Ford would say, 'Their long national nightmare is now over,'" the "Mad Money" host said. "This is a good move."

Scharf, 54, comes to Wells Fargo after serving as CEO of Bank of New York Mellon, a position he held since July 2017. He had become chairman of BNY Mellon in January 2018. He's currently a Microsoft board member. Prior to BNY Mellon, he served four years as CEO of credit card giant Visa.

"I think the expenses are going to be really coming down. Charlie is a technology guy. It's going to help there," Cramer said.

Wells Fargo's interim CEO, Allen Parker, the bank's general counsel, will continue to mind the shop until Scharf officially starts next month.

The nation's fourth-largest bank had been without a permanent CEO since the abrupt resignation of Tim Sloan in March. Sloan, who had spent more than three decades at Wells Fargo, failed to satisfy regulators' demands to overhaul the sprawling institution after it was revealed that bank employees had created millions of fake accounts to meet sales quotas.