How to enter formula on separate line in one cell

ohnow

New Member
Joined
Apr 27, 2017
Messages
39
Hi,
I use the Win Alt-Ent to move text to a new line within one cell. I recently learned you can do that with formulas too, to make them easier to read and it won't break the formula. I've done that, but I'm wondering if, within the cell, there is a way to Tab a certain number of spaces, or manually enter spaces?

In other words, in VBA, you can write a nested code breaking out a formula into individual line and you can tab or space each line. The end result might look like a book outline, for lack of a better way to explain it.

I'm not sure of the proper way to show formulas like this, so I'd welcome any advice. I haven't found the correct search terms yet, I guess.

When I edit a cell, I'd like to see a formula this way:

=if(2+2=4,
1,
0)

Keeping in mind, this might not be exactly the "proper" way to break out a formula.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
AFAIK there is no way of using tabs, it will need to be spaces.
 
Upvote 0
AFAIK there is no way of using tabs, it will need to be spaces.
Thanks for the help. I was so deep in details, I didn't think of simply trying spaces to see if it would break the formula. Spaces won't break the formula. Tab will just move the cursor 5 spaces. Hope this helps others :) I wish I would've known this many years ago versus copying long formulas, and manually entering them as text in separate cells to try to understand what they were doing. . . besides other ways like helper columns, table formats, pivots, etc.
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0
then im not sure what OP (whatever this shortcut means, I'm bad with shortcuts) wants to do.

Maybe recording a formula and using L alt enter while typing it will show some new vba code ?
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,179
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top