K
keithb
I need to assign a name to a formula. Using the code shown below, the
resulting named formula is surrounded by quotation marks and does not
execute properly when the name is used in a cell reference. Can someone
suggest an alternate syntax that will name the formula without adding
quotation marks?
sFormula = "OFFSET(Sheet1!$E$1,1,0,COUNTA(Sheet1!$E:$E)-1)"
ActiveWorkbook.Names.Add Name:="thispath", RefersToR1C1:=sFormula
Thanks,
Keith
resulting named formula is surrounded by quotation marks and does not
execute properly when the name is used in a cell reference. Can someone
suggest an alternate syntax that will name the formula without adding
quotation marks?
sFormula = "OFFSET(Sheet1!$E$1,1,0,COUNTA(Sheet1!$E:$E)-1)"
ActiveWorkbook.Names.Add Name:="thispath", RefersToR1C1:=sFormula
Thanks,
Keith