Need static cell value to change to value relative in column B regardless where cursor is positioned

wilkisa

Well-known Member
Joined
Apr 7, 2002
Messages
657
Office Version
  1. 365
  2. 2016
  3. 2013
Platform
  1. Windows
I need help with this one. My user has a very large workbook (22 columns, thousands of rows). In cell I7, he wants to have it change to whatever the value is in column B that corresponds to his position in the workbook. For example, he clicks in cell F220, the value in B220 is 1559 and that should appear in cell I7. He then clicks in cell P87 and the value in B87 is 1190. I7 should then become 1190. What formula or VBA statement should I make to have this happen. I'm in over my head on this one.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Try this macro in the worksheet code module.
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Range("I7") = Range("B" & ActiveCell.Row)
End Sub
 
Upvote 0
Thank you so much! This is exactly what I needed.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,264
Members
452,627
Latest member
KitkatToby

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