ItalianPlatinum
Well-known Member
- Joined
- Mar 23, 2017
- Messages
- 857
- Office Version
- 365
- 2019
- Platform
- Windows
Would someone be able to help me modify the below so column Q that starts on Q11 gets transferred (A-Q) for to sheet WsALL if the cell is greater than 1?
it errors here with runtime 1004
VBA Code:
'transfer data over to Compare tab
vCols = Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17) '<- Columns of interest in specified order
With WsSec
With .Range("A11:Q" & .Range("H" & rows.count).End(xlUp).row)
vRows = Application.Index(.Cells, Evaluate("row(1:" & .rows.count & ")"), Array(17))
For ii = 1 To UBound(vRows)
If Len(vRows(ii, 1)) > 1 Then
kk = kk + 1
vRows(kk, 1) = ii
End If
Next ii
nrALL = WsALL.Range("A" & rows.count).End(xlUp).row + 1
WsALL.Range("A" & nrALL).Resize(kk, UBound(vCols) + 1).Value = Application.Index(.Cells.Value, Application.Index(vRows, 0, 1), vCols)
End With
End With
it errors here with runtime 1004
VBA Code:
WsALL.Range("A" & nrALL).Resize(kk, UBound(vCols) + 1).Value = Application.Index(.Cells.Value, Application.Index(vRows, 0, 1), vCols)