excel - Use VBA to insert a formula in a cell -


i have function should fill 8 rows formula

sub df_opbouwen()    num_weeks = 8 + 10    = 10 num_weeks       sheets("blad1").cells(i, 2).formula = "=weeknummer(d10)"    next  end sub 

however, when open excel, still #name? error. that's strange because when enter =weeknummer(d10) in cell work.

any thoughts on goes wrong here?

you have small type error:

sub df_opbouwen()  num_weeks = 8 + 10  = 10 num_weeks     sheets("blad1").cells(i, 2).formula = "=weeknum(d10)" next  end sub 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -