View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Array VLOOKUP lookup_Value does not increment

Hi Howard,

Am Wed, 30 Jul 2014 11:12:47 -0700 (PDT) schrieb L. Howard:

Is there a way to make B2 increment as the formula is filled down the columns?
As is, all formulas are identical.

Is it because it's a array formula that prevents the increments?
I increments on the sheet if done manually but not in the code.


try:

Sub VLook()

Dim LRow As Long

LRow = Cells(Rows.Count, "B").End(xlUp).Row
Range("C2:F2").FormulaArray =
"=VLOOKUP(B2,Sheet3!$B$2:$F$10,{2,3,4,5},0)"
Range("C2:F2").AutoFill Range("C2:F" & LRow)
End Sub


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional