What is this command, anyway? It’s a way of reflowing text. You can get it from the Editing section of the Home tab:

Or from the Vertical section of the Alignment tab:

Suppose you have text like this …

… and you want to fit it all from columns A:E, not A:K. Make the selection as this:

purposely selecting a few extra rows, then issuing the Justify command:

and the result is:

just what you wanted. If you selected A1:C2 first, you would see an Excel warning message:

which means all the text won’t fit inside A1:C2. If that’s ok with you, then you’d see:

And if you justify selected area A1:Z9 , it would reflow back to the original: