I am trying to auto-fill tow formulas into two columns to the last row on my report. Every things goes thru smoothly until I get to the LastRow formula. I keep getting an error and I don't understand why.
Dim xlApp As Object
Dim lRow1 As Long
Set xlApp = CreateObject("Excel.Application")
.Visible = True
strFormulas(1) = "=SUMIF(Charity_Line20!$A:$A,E10,Charity_Line20!$D:$D)"
strFormulas(2) = "=SUMIF(Charity_Line22!$A:$A,E10,Charity_Line22!$G:$G)"
lRow1 = .Sheets("Sheet1").Cells(.Rows.Count, "U").End(xlUp).Row
.Range("V10:W" & lRow1).AutoFill = strFormulas
If anyone is able to help me, or see where I am coding it wrong, that would be so helpful. My issues is the lRow1