View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default create a macro with the match lookup_array is changing everyday

Try
ActiveCell.FormulaR1C1 = "=MATCH(RC[1],C[2],0)"

OR

Dim lngRow As Long
lngRow = Cells(Rows.Count, ActiveCell.Offset(, 2).Column).End(xlUp).Row
ActiveCell.FormulaR1C1 = "=MATCH(RC[1],R1C[2]:R" & lngRow & "C[2],0)"


--
Jacob (MVP - Excel)


"Asraf" wrote:

Dear all,

I have a problem to create a macro bcos my data for lookup_array will be add
up everyday.


Sub Macro1()

ActiveCell.FormulaR1C1 = "=MATCH(RC[1],R1C[2]:R10C[2],0)"

End Sub