bryanalmeida525
New Member
- Joined
- Dec 12, 2017
- Messages
- 12
Sub Steps()
Dim col(1 To 2) As Variant
Dim arr() As Variant
Dim x As Long
Dim LR As Long
col(1) = 2
col(2) = 16
Application.ScreenUpdating = False
For i = 1 To 2
For x = 1 To 2
With Sheets("Amir")
LR = .Cells(.Rows.Count, col(x)).End(xlUp).Row - 1
arr = .Cells(3, col(x)).Resize(LR).Value
End With
Sheets("Entry").Cells(Rows.Count, 1).End(xlUp).Resize(UBound(arr, 1)).Value = arr
Erase arr
Next x
Next i
Sheets("Entry").Range("A:A").SpecialCells(xlCellTypeBlanks).Delete shift:=xlUp
Application.ScreenUpdating = True
Erase col
End Sub
I need line:
Sheets("Entry").Cells(Rows.Count, 1).End(xlUp).Resize(UBound(arr, 1)).Value = arr
to paste starting at (A7) without ruining the Ubound and the rest of the formula.
Dim col(1 To 2) As Variant
Dim arr() As Variant
Dim x As Long
Dim LR As Long
col(1) = 2
col(2) = 16
Application.ScreenUpdating = False
For i = 1 To 2
For x = 1 To 2
With Sheets("Amir")
LR = .Cells(.Rows.Count, col(x)).End(xlUp).Row - 1
arr = .Cells(3, col(x)).Resize(LR).Value
End With
Sheets("Entry").Cells(Rows.Count, 1).End(xlUp).Resize(UBound(arr, 1)).Value = arr
Erase arr
Next x
Next i
Sheets("Entry").Range("A:A").SpecialCells(xlCellTypeBlanks).Delete shift:=xlUp
Application.ScreenUpdating = True
Erase col
End Sub
I need line:
Sheets("Entry").Cells(Rows.Count, 1).End(xlUp).Resize(UBound(arr, 1)).Value = arr
to paste starting at (A7) without ruining the Ubound and the rest of the formula.