View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JUAN JUAN is offline
external usenet poster
 
Posts: 14
Default Fill down VLOOKUP

Hello,
I want to see if its possible to fill down my VLOOKUP
formula, which I created in my macro. This is part of the
macro:
Range("B2").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(C[1],Sheet1!RC[-1]:R
[155]C,2,0)"

My file will vary in rows so if I do in my macro a range
example, B2:B40 as an autofill, it will put #NA error
because there is no data. So is there a way to copy my
vlookup and not get an error. As I said my file might be
over 50 rows or less than that.

Please advise any help.
thanks,
Juan