Naming a range

  • Thread starter Thread starter Heather
  • Start date Start date
H

Heather

Is there a way for me to name this so that I can use it later to total with
another section

target.Offset(, 6).FormulaR1C1 = "=SUM(R[-1]C:R10C)"

Thank you, Thank you
 
Hi

Look at this:

target.Offset(, 6).FormulaR1C1 = "=SUM(R[-1]C:R10C)"
ActiveWorkbook.Names.Add Name:="SumCell", RefersTo:="=Sheet1!" &
target.Offset(, 6).Address

Debug.Print Range("SumCell").Value

Regards,
Per
 
You mean name the range that gets the formula:

target.Offset(, 6).FormulaR1C1 = "=SUM(R[-1]C:R10C)"
target.Offset(, 6).Name = "myTotalCell"

Then you could use:

=(mytotalcell + a3) * 12
(or some other expression)
Is there a way for me to name this so that I can use it later to total with
another section

target.Offset(, 6).FormulaR1C1 = "=SUM(R[-1]C:R10C)"

Thank you, Thank you
 
Back
Top