Using GET.CELL with Type_num 15 in Excel

Last reviewed: September 2, 1997
Article ID: Q75622

The information in this article applies to:
  • Microsoft Excel for Windows, versions 2.x, 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

REFERENCES

Online Help, version 5.0 "Function Reference," version 4.0, page 191-194 "User's Guide," version 3.0, page 564 "Function Reference," version 3.0, page 103


Additional query words: 2.0 2.00 2.01 2.1 2.10 2.2 2.20 2.21 3.0 3.00
4.0 4.00 5.0 5.00 7.00
Keywords : kbcode kbprg PgmOthr
Version : 2.x 3.0 4.0 5.0 7.0 | 2.20 2
Platform : OS/2 WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.