Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 68
Default show row number in one fixed cell in reference to your cursor pos.

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 47
Default show row number in one fixed cell in reference to your cursor pos.

Hello,

You can use this code in the Sheet Module

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("A1").Value = ActiveCell.Row
End Sub
--
Kevin Smith :o)


"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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default show row number in one fixed cell in reference to your cursor pos.

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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 68
Default show row number in one fixed cell in reference to your cursor

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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default show row number in one fixed cell in reference to your cursor

Disable macros. Quit Application and reopen the file and check whether it
works?

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


"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



  #6   Report Post  
Posted to microsoft.public.excel.misc
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i assign cell A1 to show the current cursor cell in Excel? OB Excel Discussion (Misc queries) 2 October 11th 06 04:02 PM
how to paste formula but reference a fixed cell HR Excel Discussion (Misc queries) 3 April 7th 06 04:27 AM
Can you have fixed cell reference when dragging/copying formulae? ducksfolly Excel Discussion (Misc queries) 4 December 20th 05 11:19 AM
reference cell value from fixed column with variable row bob z Excel Discussion (Misc queries) 0 May 23rd 05 11:30 PM
show comments when cell is highlighted Vs when cursor runs over? Don Excel Discussion (Misc queries) 3 April 30th 05 01:50 PM


All times are GMT +1. The time now is 06:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"