I have the following code but I need to modify it to only copy the first 16 columns, not the entire row of data. Any ideas?
Sub CopyData()
Dim PRange As Range
Dim Rfinal As Range
Dim Prow As Range
Dim RowNum As Long
'PRange is is from P1 to last cell in Column P
Sheets("Deal Entry"
.Activate
Set PRange = Worksheets("Deal Entry"
.Range(cells(1, 16), cells(65536, 16).End(xlUp))
PRange.Select
With PRange
Set c = .Find(Range("A1"
.Value, after:=Range("P1"
, searchdirection:=xlPrevious)
lRow = 187
If Not c Is Nothing Then
firstrow = c.Row
RowString = c.Row & ":" & c.Row
Do
Sheets("Reports"
.Rows(lRow) = Sheets("Deal Entry"
.Rows(c.Row).Value
lRow = lRow + 1
Set c = .FindNext(c)
Loop While Not c Is Nothing And firstrow <> c.Row
Range("p8"
.Select
End If
Sheets("Reports"
.Activate
Range("a187"
.Select
End With
End Sub
Sub CopyData()
Dim PRange As Range
Dim Rfinal As Range
Dim Prow As Range
Dim RowNum As Long
'PRange is is from P1 to last cell in Column P
Sheets("Deal Entry"
Set PRange = Worksheets("Deal Entry"
PRange.Select
With PRange
Set c = .Find(Range("A1"
lRow = 187
If Not c Is Nothing Then
firstrow = c.Row
RowString = c.Row & ":" & c.Row
Do
Sheets("Reports"
lRow = lRow + 1
Set c = .FindNext(c)
Loop While Not c Is Nothing And firstrow <> c.Row
Range("p8"
End If
Sheets("Reports"
Range("a187"
End With
End Sub