excel vba - VBA Setting Formula in Range - Problems -
i have following problem. want fill in formula (=""
) in different cells, necessary fill in kind of formula instead of leaving cells empty due processing file. however, if loop on different cells, in following way:
for col = 10 99 row = 10 11 if col mod 3 <> 0 worksheets(name_sheet).range("a1").offset(row - 1, col - 1).formula = "=""" worksheets(name_sheet).range("a1").offset(row - 1, col - 1).locked = true worksheets(name_sheet).range("a1").offset(row - 1, col - 1).interior.themecolor = xlthemecolorlight2 worksheets(name_sheet).range("a1").offset(row - 1, col - 1).interior.tintandshade = 0.799981688894314 end if next row next col
then receive error formula can not assigned. nevertheless not see error produces.
thanks lot help
kind regards claude
it's kinda confusing when try put "
in cell via vba. need escape "
...
try this:
"="""""
Comments
Post a Comment