Formula to dynamically use content at cursor position

MSteel

New Member
Joined
May 11, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi I can't find the answer in the archive.

I want to dynamically (ie without refresh/F9) use the value at the cursor position in a formula.

so assume I've a list of values in A1....A5

5
10
15
20

and as I move the cursor down the list I want a formula in another cell to use that (for example =n x 100) where n is the value in the list.

I can see CELL("address") can give me location (like $A$1) but how do I do this dynamically ?
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Hi,

Welcome to Mr.Excel. Kindly use event handler (SelectionChange for Worksheet).

VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Sheets("Sheet1").Range("D2") = Target.Value * 2
End Sub
 

Attachments

  • selectionChangeEvent.JPG
    selectionChangeEvent.JPG
    50.3 KB · Views: 28
  • selectionChangeEventOutput.JPG
    selectionChangeEventOutput.JPG
    17.6 KB · Views: 28
Upvote 0

Forum statistics

Threads
1,225,738
Messages
6,186,734
Members
453,369
Latest member
juliewar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top