View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default using variable in setting and ActiveCell

maybe...

Dim myName as string
myName = "1A"

ActiveCell.FormulaR1C1 _
= "=SUMIF('" & myname & "'!R6C1:R[32]C1,R5C1:R[32]C1,'" _
& myname & "'!R6C10:R[32]C10)"


Untested, uncompiled.

dawall33 wrote:

I would like to replace the 'a1' with a String variable I have defined
earlier in the script in the following line:

ActiveCell.FormulaR1C1"=SUMIF('1a'!R6C1:R[32]C1,R5C1:R[32]C1,'1a'!R6C10:R[32]C10)"

I am trying to automate the creation of summary lines on a sheet for a
range of sheets in my workbook.


--

Dave Peterson