View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default entering formula using VBA

Use this Alex

ActiveCell.Formula = "=AVERAGE(apple)"


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Alex ekster" wrote in message ...
Thank you very much for your posting.
I am trying to find right syntax to use variable range as an argument in
formula using VBA.
For example how to replace "b1:B5" by a range called "apple" in the
following example:
activecell.Formula= "=AVERAGE("b1:b5")"
Thanks,
Alex



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!