How to Make a Cell that Just Changed the ActiveCell

newuser2015

New Member
Joined
Sep 28, 2015
Messages
2
I have code triggered to run as soon as the user enters a number in a certain range of cells. Is there a way to make it so that the cell that changed in this range is now the activecell?

So for example, if column A has the formula to add columns B + C and a user makes a change to B5 - how do I make cell A5 the activecell now which just changed because of the formula?


Private Sub Worksheet_Change(ByVal Target As Range)

If Not Application.Intersect(Target, Range("R2:R60000")) Is Nothing Then
My code which I am trying to get the cell that changed in this range to be the activecell
End If

End Sub
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
It's not the formula changing that triggers the Worksheet_Change code.
It's the cell that the user typed in that triggers it.

I'm not aware of any means to track 'which' formula actually changed.
But we do know which ROW # was changed, that is Target.Row
If you know it's column A that is the formula
Then you can do

Range("A" & Target.Row).Select
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,204
Members
449,072
Latest member
DW Draft

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