G
Graeme
Hi,
Hoping for some help to modify the code below.
I have data in Sheet 1, and if column C = "Trigger", I need to copy the
cells in that row from columns D thru P. Sheet 2 is the destination, and I
am trying to do a copy, paste values and transpose into column A. And then
delete all zero values from column A of sheet 2.
Thank you, and here is the code:
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Dim r As Range
Dim c As Range
Set ws1 = Sheets("Sheet1")
Set ws2 = Sheets("Sheet2")
Set r = ws1.Range("C1", ws1.Range("C65536").End(xlUp))
For Each c In r.Cells
If c = "Trigger" Then
'need new code here for the copy / paste part
c.EntireRow.Copy
Destination:=ws2.Range("A65536").End(xlUp).Offset(1, 0)
End If
Next c
'need code here to delete all the zeros
Hoping for some help to modify the code below.
I have data in Sheet 1, and if column C = "Trigger", I need to copy the
cells in that row from columns D thru P. Sheet 2 is the destination, and I
am trying to do a copy, paste values and transpose into column A. And then
delete all zero values from column A of sheet 2.
Thank you, and here is the code:
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Dim r As Range
Dim c As Range
Set ws1 = Sheets("Sheet1")
Set ws2 = Sheets("Sheet2")
Set r = ws1.Range("C1", ws1.Range("C65536").End(xlUp))
For Each c In r.Cells
If c = "Trigger" Then
'need new code here for the copy / paste part
c.EntireRow.Copy
Destination:=ws2.Range("A65536").End(xlUp).Offset(1, 0)
End If
Next c
'need code here to delete all the zeros