1

I am new to VBA and trying to put a formula in that is essentially just a sum function.

It's basically: =sum(A1:A5)

And it works - except it doesn't. When I click on it, it shows that it's working (i.e. it highlights the sum range as if it's calculating), but nothing sums up when I start entering numbers? I've put this into the code but it still doesn't work: Application.calculation = xlCalculationAutomatic

I've searched the site and google for a solution and it seems other people have had a similar problem but I can't find/understand the solution. Thanks in advance for any help!

  • 2
    If you're having a problem with code then it's best to include it in your post. – Tim Williams Sep 27 '21 at 00:27
  • I’m out at the minute but the code that it gets stuck on is: activecell.offset(6,1).formula = “=sum(“ & range(activecell.offset(0,1).address(false, false), activecell.offset(5,1).address(false,false)) & “)” The code works as it puts the correct formula in the correct cell, and it even shows that it’s working via the highlighte cells once I go into the formula but it doesn’t actually calculate anything. – excelstuff345 Sep 27 '21 at 11:25

1 Answers1

0

Try this answer https://stackoverflow.com/a/154439/10645228

So you're close - switch it off and on again!

jmejay
  • 56
  • 7