Microsoft KB Archive/75622

{|
 * width="100%"|

Using GET.CELL with Type_num 15 in Excel

 * }

Q75622

-

The information in this article applies to:


 * Microsoft Excel for Windows, versions 2.0, 2.01, 2.1, 2.10c, 2.10d, 3.0, 4.0, 5.0
 * Microsoft Excel for Windows 95, version 7.0
 * Microsoft Excel for OS/2, versions 2.2, 3.0

-

SUMMARY
The GET.CELL macro function with type number 15 returns TRUE or FALSE, depending on whether the selected cell has been hidden by selecting Cell Protection from the Format menu and checking the Hidden check box. This function does not test to see whether the cell has been hidden using the Row Height or Column Width commands in the Format menu.

MORE INFORMATION
Formatting cell protection to hidden prevents a selected cell's formula from being displayed or changed in the formula bar. GET.CELL(15) will return TRUE if the cell protection is formatted as hidden in this manner. GET.CELL(15) does NOT test for columns or rows that have been hidden by choosing the Row Height or Column Width command from the Format menu and choosing the Hide button. You can use GET.CELL(16) and/or GET.CELL(17) to test for hidden rows or columns.

For help with GET.CELL in Microsoft Excel 5.0, from the Help menu, choose Contents, then select Reference Information. Select Microsoft Excel Macro Functions Contents, then choose Alphabetical List of Macro Functions and scroll down the list until you reach GET.CELL.

In Microsoft Excel version 5.0, you can also use Visual Basic for Applications code to confirm whether an active cell is in a hidden row or hidden column.

  Sub testhiddenrow hiddenrow = Rows(ActiveCell.Row).Hidden MsgBox hiddenrow End Sub Sub testhiddencolumn hiddencol = Columns(ActiveCell.Column).Hidden MsgBox hiddencol End Sub