Get the cell address

nithinkm

Board Regular
Joined
May 7, 2008
Messages
70
Hi

Please help me in doing this

In the worksheet_change event the target address im getting now is the address of the cell that is currently active. But i need is the address of the changed cell (if any change is made to a particular cell) not the currently activated cell after changing

Thanks in advance
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Target IS the cell(s) that was changed.

Do you mean you want the cell who's value changed via a Formula?

That's the Calculate Event
 
Upvote 0
Hi,

Not quite sure what you mean.

If you run this:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox Target.Address
End Sub

It should return the address of the cell that has changed not the one that becomes active afterwards.

Maybe posting the code that you are using might help.

Dom
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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