G
Greg B
Hi all,
I have this code (shown below) which looks up a value in column e and copies
to another worksheet. I have it to copy the whole row, so how can I change
it to only copy columns a & e on row 5 for example.
Dim rng As Range, cell As Range, col As Long
Dim rw As Long
col = 5
rw = 1
With Worksheets("list")
Set rng = .Range(.Cells(1, col), .Cells(Rows.Count, col).End(xlUp))
End With
For Each cell In rng
If LCase(cell.Value) = "yes" Then
cell.EntireRow.Copy Destination:=Worksheets("fortnight") _
.Cells(rw, 1)
rw = rw + 1
End If
Next
Thanks in advance
Greg
I have this code (shown below) which looks up a value in column e and copies
to another worksheet. I have it to copy the whole row, so how can I change
it to only copy columns a & e on row 5 for example.
Dim rng As Range, cell As Range, col As Long
Dim rw As Long
col = 5
rw = 1
With Worksheets("list")
Set rng = .Range(.Cells(1, col), .Cells(Rows.Count, col).End(xlUp))
End With
For Each cell In rng
If LCase(cell.Value) = "yes" Then
cell.EntireRow.Copy Destination:=Worksheets("fortnight") _
.Cells(rw, 1)
rw = rw + 1
End If
Next
Thanks in advance
Greg