I've used a Vlookup to return values in column I, however only half of the cells in this column returned a value (the other half are blank). I'd like my Macro to enter a space " " in all of the empty Vlookup cells rather than keeping the Vlookup equation in the cell. I want to filer all the values in the column and then change the blank cells to =" "
My ultimate goal is to post a Note on each line based on whether cell I has a value or a blank. If cell I for any given line is blank, the cell in column K for that line will auto-fill "Processed Not Yet Paid", if there is a value in cell I, cell K will auto-fill "Paid"
My problem is that I don't know how to write an equation that avoids the hidden cells (hidden from the filter) and changes only the values of the cells displayed after the filter. My column headers are in row 4 and my code is presented below:
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, "C").End(xlUp).Row
Range("A4:K" & Lastrow).Select
Selection.AutoFilter
ActiveSheet.Range("$A$4:$K" & Lastrow).AutoFilter Field:=9, Criteria1:="="
Range("I4").Offset(1, 0) = " "
Selection.AutoFill Destination:=Range("Range("I4").Offset(1, 0):I" &
Lastrow)
VLOOKUP
formulas in anIFERROR
to get your space that you want? Something like=IFERROR(VLOOKUP(A1,B:C,2,FALSE),"")
– dwirony