excel - using cell address in vba formula -


i'm trying use cell address in if formula , error msg. defined avgcell/stdcell string, , if function doesn't how read it

here code:

dim avgcell string   activecell.formula = "=average(m" & startrow & ":m" & myrow - 1 & ")"      avgcell = cells(myrow + 1, 14).address      cells(k, 14).formular1c1 = "=if(rc[-1]>" & avgcell & " + " & stdcell & ",1,0)" 

it may because you're mixing a1 , rc address references.

try changing this:

avgcell = cells(myrow + 1, 14).address(referencestyle:=xlr1c1) 

and whatever line setting address stdcell


Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -