View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default show row number in one fixed cell in reference to your cursor

=cell("row") works without VBA code.

If you use it in A1 it will return the row number of the active cell.

Will update only when a calculation takes place.

See help on cell infotype


Gord Dibben MS Excel MVP

On Wed, 9 Sep 2009 00:09:02 -0700, Howard
wrote:

Thank you so much. it is workable but ss there any other method beside using
macro?

In actual fact, i received one file and in the cell A1, there is one formula
as =cell("row") but i couldn't find any macro created in the file.

When i placed my cursor at cell A115, cell A1 will display 115. I am still
figuring how to do it beside using macro.





"Jacob Skaria" wrote:

Right click the sheet tabView code and paste the below code in the right
code panel. Try selecting cells...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = False
Range("A1") = Target.Row
Application.EnableEvents = True
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Howard" wrote:

For example,
key in this formula cell("row") in cell A1
when you move your cursor to Cell B9
cell A1 will display "9" = row 9 where ur cursor being placed at