0
votes

I've been looking for a way to code in VBA: when I click on a certain cell (doesn't matter which one, as long it's in column X), Excel should copy that cell value to a specific cell B10.

Can anyone help please? Probably simple, but I get errors every time!

Thanks!

1
What have you tried so far? Do you have any code which you tried?corvairjo

1 Answers

0
votes

Try the Worksheet_SelectionChange event for that worksheet:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Target.Column = 19 Then ' check if cell modifed is in column "S"
    Target.Copy Range("B10")
End If

End Sub