The difficult outlook for software stocks should continue into 2023, but companies offering growth at a reasonable price stand to gain and come out on top, according to Morgan Stanley. Software stocks suffered a dismal 2022 as rising interest rates brought down stocks with sky high price-to-earnings ratios. Multiples plummeted from record highs, stock prices crashed and investors rotated out of growth sectors in search of safety. Those headwinds won’t fade in the new year, but opportunities exist for investors who pick stocks carefully. “We do expect more pain in the very near-term — 4Q prints likely bring further negative revisions to topline growth expectations — however, margins and [free cash flow] likely prove more durable than feared, which has us favoring the solid [growth at a reasonable price] stories well able to protect [earnings per share/free cash flows] like MSFT , NOW , PANW and WDAY near-term,” wrote analyst Keith Weiss in a note to clients Monday. While the group’s lower multiples may suggest dwindling optimism, it also creates an intriguing entry point for investors with longer-term time horizons to buy high-growth names, he said. Given this outlook, Morgan Stanley suggests investors look for companies with attractive multiples, saying many are trading near 10-year lows, and focus on those growing their profit margins. IT spending may dwindle in 2023, but solid growth opportunities exist long-term as companies focus on the cloud, the bank said. Here are some of the stocks that made Morgan Stanley’s list: Morgan Stanley named ServiceNow its top pick in software, saying its shares are poised to benefit as companies refocus IT budgets and consolidate spending even as a downturn looms. Weiss expects the company’s expanding growth opportunities and solid unit economics to support more than 30% free cash flow growth in 2023 and 2024. “The nature of the company’s subscription model gives us confidence in the durability of growth in the near-term, while ServiceNow’s transition from System of Record in IT to System of Action bridging multiple systems across the enterprise significantly broadens the growth opportunity longer-term,” Weiss said. Despite ServiceNow’s decline of more than 39% this year, Morgan Stanley’s $612 price target implies more than 55% upside from Friday’s close. Technology bellwether Microsoft is another top idea heading into 2023. The investment bank called the PlayStation and LinkedIn parent a prime beneficiary as companies consolidate software spending, seeing growth opportunities in areas such as data management and security. Shares of Microsoft have tumbled almost 29% this year, trading at a discount to its historical multiples, but Morgan Stanley’s price target suggests 25% upside from Friday’s close. “Longer-term, we remain confident in Microsoft’s durable double-digit constant currency growth profile and expanding margins, supporting an attractive risk/reward profile,” Weiss wrote. Along with its top picks, Morgan Stanley named a host of stocks poised to benefit in any recovery. That includes Snowflake , which it expects to benefit as enterprises build out their data cloud, and CrowdStrike . “We think CrowdStrike will be a key battleground stock in 2023 as investors debate the durability of growth within their core endpoint security market and longer term competitive dynamic,” Weiss said. Morgan Stanley also included Toast and Datadog as stocks to build positions in as interest rates subside and growth improves. — CNBC’s Michael Bloom contributed reporting