Skip to content

Latest commit

 

History

History
46 lines (26 loc) · 1.13 KB

Excel.Range.Justify.md

File metadata and controls

46 lines (26 loc) · 1.13 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Range.Justify method (Excel)
vbaxl10.chm144152
vbaxl10.chm144152
Excel.Range.Justify
f8b4d48b-8cbb-977a-fd44-d354661182d2
05/11/2019
medium

Range.Justify method (Excel)

Rearranges the text in a range so that it fills the range evenly.

Syntax

expression.Justify

expression A variable that represents a Range object.

Return value

Variant

Remarks

If the range isn't large enough, Microsoft Excel displays a message telling you that text will extend below the range. If you choose the OK button, justified text replaces the contents in cells that extend beyond the selected range. To prevent this message from appearing, set the DisplayAlerts property to False. After you set this property, text will always replace the contents in cells below the range.

Example

This example justifies the text in cell A1 on Sheet1.

Worksheets("Sheet1").Range("A1").Justify

[!includeSupport and feedback]