Hi,
I have followed several examples found here on the usage of SpecialCells(xlCellTypeVisible) to autofill visible cells in filtered rows.
However it keeps throwing back Run-time error '1004': AutoFill method of Range class failed.
The last row of code works without the SpecialCells and will autofill all cells including hidden ones. Please help
Dim LastRow As Long
'Get last row of data
LastRow = Range("B" & Rows.Count).End(xlUp).Row
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(C[-10],'[Arista ItemsinBacklog - Template.xlsm]JSGBacklog'!C2:C16,15,0)"
Selection.AutoFill Destination:=Range(ActiveCell.Address & ":L" & LastRow).SpecialCells(xlCellTypeVisible)
I have followed several examples found here on the usage of SpecialCells(xlCellTypeVisible) to autofill visible cells in filtered rows.
However it keeps throwing back Run-time error '1004': AutoFill method of Range class failed.
The last row of code works without the SpecialCells and will autofill all cells including hidden ones. Please help
Dim LastRow As Long
'Get last row of data
LastRow = Range("B" & Rows.Count).End(xlUp).Row
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(C[-10],'[Arista ItemsinBacklog - Template.xlsm]JSGBacklog'!C2:C16,15,0)"
Selection.AutoFill Destination:=Range(ActiveCell.Address & ":L" & LastRow).SpecialCells(xlCellTypeVisible)