I know this was a while back - but any help would be amazing. How can I use this exact code BUT copy/paste values only? (No formulas/formatting etc). Thanks!Put this script in sheet named
OptionsCode:Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) 'Modified 8/28/2018 10:57:21 AM EDT If Not Intersect(Target, Range("A:A")) Is Nothing Then If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub Cancel = True Dim Lastrow As Long Lastrow = Sheets("List").Cells(Rows.Count, "A").End(xlUp).Row + 1 Target.Copy Sheets("List").Cells(Lastrow, 1) End If End Sub
I was wanting to know how to expand this code to do this: say on sheet 1 have have data in columns A and C, when double clicking a cell in A, I want it to populate A and C onto sheet 2 columns A and B, on the next empty row?Put this script in sheet named
OptionsCode:Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) 'Modified 8/28/2018 10:57:21 AM EDT If Not Intersect(Target, Range("A:A")) Is Nothing Then If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub Cancel = True Dim Lastrow As Long Lastrow = Sheets("List").Cells(Rows.Count, "A").End(xlUp).Row + 1 Target.Copy Sheets("List").Cells(Lastrow, 1) End If End Sub