Macro command Align

<< Click to Display Table of Contents >>

Navigation:  Macros > Macro commands and parameters > Macro reporting commands > Macro write to Excel >

Macro command Align

Purpose:

To align the text of a range of cells in a spreadsheet horizontally and vertically.

 

General notation:

Align ( FileIndex, sheet , row1 , column1 , row2 , column2 , Alignment )

 

Series of cells can be addressed using row and column numbers. The values row1 and column1 refer to the top left-hand corner of a series, while row2 and column2 refer to the bottom right-hand corner. The normal Excel notation (identification of a cell by means of a combination of letters and numbers) is not possible because the macro language works on a numeric basis.

 

Alignment is an integer number of value: 00, 01, 02, 03, 10, 11, 12, 13, 20, 21, 22, 23, 30, 31, 32, 33.

The left digit indicates the vertical alignment: 0=none, 1=top, 2=center, 3=bottom.

The right digit indicates the horizontal alignment: 0=none, 1=left, 2=center, 3=right.