In elementary Excel it is not possible using a formula.
However, if you are good with the keyboard then use the shortcut keys:
Select or highlight the cell range to be indented:
Press Ctrl+1 --> A --> Alt+H --> Select Indentation --> Enter --> Enter.