In MS Word 2016 table, how to get the current row number using formula or field?

Mahmoud Ali 1 Reputation point
2022-03-26T13:40:45.667+00:00

I have a table in MS Word 2016 document, I need to use field/formula to return the current row number. How to do that?

I found this article https://support.microsoft.com/en-us/office/use-a-formula-in-a-word-or-outlook-table-cbd0596e-ea8a-485e-a35d-b2cb2c4f3e27 which mentions the following:

To refer to… The row that contains the formula
…use this reference style --> R

Can anybody highlight how to use such a reference?

Note: The first column in the table has a field with sequence, so if the reference works I can get the value of that field.

This question is also posted here
what-is-the-equivalent-in-ms-word-for-row-function

Microsoft 365 and Office | Word | For business | Windows
{count} votes

2 answers

Sort by: Most helpful
  1. John Korchok 6,416 Reputation points Volunteer Moderator
    2022-03-26T14:21:23.597+00:00

    That would be possible with a VBA macro. I'm not aware of any field or formula that would be able to calculate the row number.


  2. Paul Edstein 571 Reputation points
    2022-03-26T21:29:10.65+00:00

    As I told you at StackOverflow before you posted here: Word has nothing like Excel's Row() function. Perhaps you need to embed an Excel worksheet in your document. Alternatively, to see how to do a wide range of calculations in Word, check out my Microsoft Word Field Maths Tutorial, at: https://www.msofficeforums.com/word/38720-microsoft-word-field-maths-tutorial.html or http://www.gmayor.com/downloads.htm#Third_party


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.