How to Determine the Position of a Cell Within a TableLast reviewed: July 30, 1997Article ID: Q89807 |
The information in this article applies to:
To determine the position (row and column number) of a cell in a table, follow the procedure below or use the macro below it.
Procedure
Macro
Sub Main MaxCol = SelInfo(18) Row = SelInfo(13) Col = SelInfo(16) If(Row = - 1) Or(Col > MaxCol) Then Print "Selection not in Table" Else Print "Row " ; Row ; ", Column " ; Col End If End SubTo use the above macro, position the insertion point in a table cell and run the macro. The row and column number appear on the status line in the following format:
Row x, Column xIf the cursor is not in a table cell when you run the macro, the following error message appears on the status line:
Selection not in TableNOTE: Information provided in this document is provided "as is"without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. Kbcategory: kbusage kbmacro kbhowto KBSubcategory: kbtable |
Additional query words: winword2 number 3.10 win31 word6
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |