RattlingCarp3048
Board Regular
- Joined
- Jan 12, 2022
- Messages
- 166
- Office Version
- 365
- Platform
- Windows
I am using formula =IF(IFERROR(VLOOKUP())) in a macro which is working when it is initially applied to the data. However, i noticed when i add more rows and use the following code to copy the same formula down the rest of the column, for some reason certain cells are filled with #N/A as text while the rest have the formula applied. I cannot find any difference in the cells with #N/A as text.
lastRow = Cells(Rows.Count, "A").End(xlUp).Row
Range("V2:X" & lastRow).SpecialCells(xlCellTypeBlanks).Formula = Range("V2:X2").Formula
Note: if i manually copy the formula down, the cells do update with the correct formula and the error goes away. the rest of the macro before this line is working perfectly.
lastRow = Cells(Rows.Count, "A").End(xlUp).Row
Range("V2:X" & lastRow).SpecialCells(xlCellTypeBlanks).Formula = Range("V2:X2").Formula
Note: if i manually copy the formula down, the cells do update with the correct formula and the error goes away. the rest of the macro before this line is working perfectly.