ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   want J1 to reflect the value of a:2:a500 as the cursor enters the (https://www.excelbanter.com/excel-programming/406813-want-j1-reflect-value-2-a500-cursor-enters.html)

Gordy99

want J1 to reflect the value of a:2:a500 as the cursor enters the
 
want J1 to reflect the value of a:2:a500 as the cursor enters the row
But how?

Jim Thomlinson

want J1 to reflect the value of a:2:a500 as the cursor enters the
 
Right click on the sheet tab that you want to react to the change in cursor
location and select view code. Paste the following code...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row = 2 And Target.Row <= 500 Then
Range("J1").Value = Cells(Target.Row, "A").Value
End If
End Sub
--
HTH...

Jim Thomlinson


"Gordy99" wrote:

want J1 to reflect the value of a:2:a500 as the cursor enters the row
But how?



All times are GMT +1. The time now is 04:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com