Hello,
How would you copy/paste adjacent cells on the same row when the target is selected?
For instance if any cell between P21:P1000 is selected then that cell and cells in different columns (P:T) on the same row are pasted to B2:F2
I've done this with one cell using the below, but I'm getting worked trying to figure out how to move multiple cells
And I reference it from WS code:
I appreciate any help with this
Thanks
How would you copy/paste adjacent cells on the same row when the target is selected?
For instance if any cell between P21:P1000 is selected then that cell and cells in different columns (P:T) on the same row are pasted to B2:F2
I've done this with one cell using the below, but I'm getting worked trying to figure out how to move multiple cells
VBA Code:
Sub Add_PO()
ActiveCell.Select
Selection.Copy
Range("B2").Select
Worksheets("Dashboard").Paste
Application.CutCopyMode = False
End Sub
And I reference it from WS code:
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("P21:P1000")) Is Nothing Then
Call Add_PO
End If
End Sub
I appreciate any help with this
Thanks