View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default entering formula using variable in Excel Macro

Hi
try:
ActiveCell.Formula = "=SUBTOTAL(9,P" & rowval -1 & ":P" &
rowval1 & ")"

--
Regards
Frank Kabel
Frankfurt, Germany

"doc-s" schrieb im Newsbeitrag
...
Trying to use following in excel Macro and it will not
work. Any help????

ActiveCell.Formula = "=SUBTOTAL(9,P & rowval -1: P &
rowval1)"


where P is column and rowval -1 is current row -1 and
rowval1 are variables.