davidmg1982
Board Regular
- Joined
- Oct 12, 2015
- Messages
- 64
Im looking for a vba solution to paste a formula on the empty cells in Column D next to a variable range in column A, any help will be very appreciated.
Thanks Fluff, i might have used the wrong words, by variable range I meant total rows in column A will be changing every day.What is the variable range in A & what is the formula?
Ok, do you want that formula in all col D down to the last row in col A, or just from the last used cell in D down to the last cell in col A, or something else?
Sub davidmg()
With Range("D1:D" & Range("A" & Rows.Count).End(xlUp).Row)
.SpecialCells(xlBlanks).FormulaR1C1 = "=IFERROR(HLOOKUP(RC[-3],pcode!R3C3:R12C3,9,0),"""")"
End With
End Sub
Ok, how aboutCode:Sub davidmg() With Range("D1:D" & Range("A" & Rows.Count).End(xlUp).Row) .SpecialCells(xlBlanks).FormulaR1C1 = "=IFERROR(HLOOKUP(RC[-3],pcode!R3C3:R12C3,9,0),"""")" End With End Sub