Microsoft KB Archive/71361

{|
 * width="100%"|

GET.CELL Command Cannot Detect an Automatic Page Break

 * }

-

The information in this article applies to:


 * Microsoft Excel for Windows, versions 3.0, 4.0, 5.0

-

SUMMARY
GET.CELL is a macro function designed to return particular information about a given cell. The &quot;Microsoft Excel Function Reference&quot; indicates that

  =GET.CELL(27)

returns the following numbers depending on whether a page break occurs at that cell:

  0 = No break 1 = Row 2 = Column 3 = Both row and column

MORE INFORMATION
Microsoft Excel detects only manual page breaks, not automatic page breaks. Manual page breaks are set by using either the function =SET.PAGE.BREAK or by choosing Set Page Break from the Options menu. Automatic page breaks are set by Microsoft Excel and cannot be removed. If an automatic page break occurs at the selected cell, Microsoft Excel returns a 0 (zero) even though there is a page break.

Additionally, =GET.CELL(27) does not detect where a print area breaks the page.

Note that in Microsoft Excel verison 5.0, you can use the PageBreak property in a Visual Basic procedure to detect an automatic page break.