How do I find the row number in a table (Excel 2010) from the selected cell.
I can find the sheet row number from ActiveRow.Row
or Selection.Row
. But I want to know what row number in the table this is.
Supposing you want to know the row number of “ink” and you already know it locates at column A, you can use this formula of =MATCH("ink",A:A,0) in a blank cell to get it's row number. After entering the formula, and then press the Enter key, it will show the row number of the cell which contains "ink".
Select cell "F7" and then insert the formula "=ROW(" and select the first cell of the range of cells with numbers list. Then hit 'Enter'. Now you get the row number of the first cell in the given range. Now, value of the formula in cell "F8" is the smallest value of the range "D7:D17" which is '2'.
Just click the column header. The status bar, in the lower-right corner of your Excel window, will tell you the row count. Do the same thing to count columns, but this time click the row selector at the left end of the row. If you select an entire row or column, Excel counts just the cells that contain data.
To test if a cell (or any text string) contains a number, you can use the FIND function together with the COUNT function. In the generic form of the formula (above), A1 represents the cell you are testing. The numbers to be checked (numbers between 0-9) are supplied as an array.
Selection.Row - Selection.ListObject.Range.Row
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With