May 07 2019 11:47 AM
im using a vlookup process to pull data from one sheet to another but the number of lines varies daily. how do i stop the #N/A being entered into cells when there is no return, or how do i limit the search to only cells with data in them?
May 07 2019 12:43 PM
May 07 2019 01:59 PM
thanks for the suggestion though i am a little confused how to wrap the formula with an IF type of statement. My formula is shown below
Range("C3").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-1],ProdOver!C[-2]:C[2],2,FALSE)"
Selection.AutoFill Destination:=Range("C3:C150"), Type:=xlFillDefault
but if i wrap it in an IF statement wouldn't that conflict with the VLOOKUP? To have the IF statement return a blank cell it needs the #N/A response from the VLOOKUP but then will delete the formula - or what am i missisng?
May 07 2019 02:29 PM