Cakz Primz
Board Regular
- Joined
- Dec 4, 2016
- Messages
- 102
- Office Version
- 365
- Platform
- Windows
Dear all,
I need to fill up in column A, with "BX", based on column B until the lastrow.
The problem is currently in column A, starting from row # 2 until row # 50,000 is filled up with "AX", but the range is dynamically change.
How to fill up with "BX" word, starting from the lastrow in column A
I try to used this code, but is not working:
I can filled up with this code below, but it's not dynamic. The number of row in column B is always changing from day to day.
And is the right/proper solution.
Thank you for your kind assistance.
Regards,
Prima Indonesia
I need to fill up in column A, with "BX", based on column B until the lastrow.
The problem is currently in column A, starting from row # 2 until row # 50,000 is filled up with "AX", but the range is dynamically change.
How to fill up with "BX" word, starting from the lastrow in column A
I try to used this code, but is not working:
VBA Code:
Dim ws2 As Worksheet
Set ws2 = ActiveSheet
Dim lRow2 As Long
lRow2 = Cells(Rows.Count, 2).End(xlUp).Row
With ws2
.Range(("A800000").End(xlUp).Offset(1,0) & lRow2).Value = "BX"
End With
I can filled up with this code below, but it's not dynamic. The number of row in column B is always changing from day to day.
And is the right/proper solution.
Code:
Sub Macro11()
Range("A135528").Select
Selection.AutoFill Destination:=Range("A135528:A161857")
End Sub
Thank you for your kind assistance.
Regards,
Prima Indonesia