Need help in coding

sumelectron

New Member
Joined
Mar 28, 2011
Messages
1
Hi,
I have a special requirement. If I paste some value (be it any value) in a cell, then the cell 10 rows below should get selected.

I am an amateur at Excel programming and learning it now. Please help me out.

Regards,
~SumElectron
 

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).
Hey sumelectron.

If you want the cell 10 rows below to be selected irrespective of whether the cell 10 rows above changes due to paste or some other reason, then the following code can work:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Cells(Target.Row + 10, Target.Column).Select
End Sub

However, if you want it only to be selected in case of a paste, I don't believe Excel natively captures paste events. But the following link does contain a way of doing it:
http://www.mrexcel.com/forum/showthread.php?t=451174
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,866
Members
452,948
Latest member
UsmanAli786

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