Rotating text isn't currently possible in Excel for the web. You can, however, rotate text in the Excel desktop app.
Tip: Don't have the Excel desktop app? Try or buy Microsoft 365.
-
Select the cell(s) to change, go to Home and select Orientation.
-
Choose a preset text direction or select Format Cells Alignment and choose the Alignment tab for custom angles.
-
Under Orientation, choose a degree angle on the wheel or type a degree angle between -90 and 90. Select OK.
For more info, see Align or rotate text in a cell.