View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
SIGE SIGE is offline
external usenet poster
 
Posts: 206
Default Write formula with code ...

Hi Bernie,

I did what you asked .... but upon entering the formula,
I get "Cannot run Visual Basic Macro because of a syntax error."

Sub Macro7()
'
' Macro7 Macro
' Macro recorded 6/02/2006 by guest
'

'
ActiveCell.FormulaR1C1 = _

"=INDEX(SOURCE,MATCH(R20C1,INDEX(SOURCE,,1),0),MAT CH(R19C,INDEX(SOURCE,1,0),0))"
End Sub