reubanrao93
New Member
- Joined
- Dec 7, 2020
- Messages
- 20
- Office Version
- 365
- Platform
- Windows
Hi Guys,
I'm trying to run this code but currently am stuck with "Run-Time-error '1004" FillDown method of range class failed" during debug. Is there something I'm missing here?
Sub PastFormula()
Dim LRw As Long
Sheets("Sheet1").Range("S:S").Select
ActiveCell.Formula = "=MID(L2,(LEN(L2)-(LEN(LEFT(L2,LEN(L2)-SEARCH(""ENO="",L2)))-4)),((LEN(LEFT(L2,LEN(L2)-SEARCH(""ENO="",L2)))-4)-(LEN(LEFT(L2,LEN(L2)-SEARCH("",SUB"",L2))))))"
LRw = Range("L" & Rows.Count).End(xlUp).Row
Range(ActiveCell, Cells(LRw, ActiveCell.Column)).FillDown
End Sub
I'm trying to run this code but currently am stuck with "Run-Time-error '1004" FillDown method of range class failed" during debug. Is there something I'm missing here?
Sub PastFormula()
Dim LRw As Long
Sheets("Sheet1").Range("S:S").Select
ActiveCell.Formula = "=MID(L2,(LEN(L2)-(LEN(LEFT(L2,LEN(L2)-SEARCH(""ENO="",L2)))-4)),((LEN(LEFT(L2,LEN(L2)-SEARCH(""ENO="",L2)))-4)-(LEN(LEFT(L2,LEN(L2)-SEARCH("",SUB"",L2))))))"
LRw = Range("L" & Rows.Count).End(xlUp).Row
Range(ActiveCell, Cells(LRw, ActiveCell.Column)).FillDown
End Sub