View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Nigel[_2_] Nigel[_2_] is offline
external usenet poster
 
Posts: 735
Default using variable in setting and ActiveCell

Something like....

Dim sVar as String
sVar = "A1"
ActiveCell.FormulaR1C1"=SUMIF(" & sVar & "!R6C1:R[32]C1,R5C1:R[32]C1," &
sVar & "!R6C10:R[32]C10)"


--

Regards,
Nigel




"dawall33" wrote in message
...
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.