Sub main () a = testfct(2) cells(1,1).value = a cells(2,1).formula = "=testfct(2)" End Sub Function testfct (i) testfct = 5*i End Function