View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Formula in macro

ActiveCell.Formula = "=Index(Client_List, Client_Selection,1)"

this assumes Client_List and Client_Selection are defined names/ranges
(Insert=Name=Define)

--
Regards,
Tom Ogilvy


"Eric" wrote:

Hello,

I am trying to write a quick macro to insert the content of a specific cell
from a 1 column array.
I am not sure of the syntax when you use an existing function in a macro,
which probably explain
why it does not work.
Here's the quick macro

Thank you.

Eric.




Sub Macro1()
'
' Macro1 Macro


ActiveCell.FormulaR1C1 = Index(Client_List, Client_Selection)
Range("K20").Select
End Sub