gheyman
Well-known Member
- Joined
- Nov 14, 2005
- Messages
- 2,347
- Office Version
- 365
- Platform
- Windows
I need to grab data from numerous tabs. I have some code that does that but I need to slightly modify it.
It would be better if it only copied down to the last row (column C) instead of all the way to row 1000. Is this possible?
Code:
Sub Consolidate_BOEs()
'
Dim ws As Worksheet
'
For Each ws In Sheets
'
If ws.Range("U1") = "54-TPL" Then
ws.Range("B11:U1000").Copy
Sheets("BOE Spreads").Cells(Rows.Count, "B").End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
End If
'
Next ws
'
End Sub
It would be better if it only copied down to the last row (column C) instead of all the way to row 1000. Is this possible?