0

having issue with the below coding I'm putting in for a VBA macro.

Simply trying to sum 2 cells

ActiveCell.Offset(0, 4).Value = SUM(ActiveCell.Offset(-2, 4).Value):(ActiveCell.Offset(-1, 4).Value)
nightcrawler23
  • 2,056
  • 1
  • 14
  • 22

1 Answers1

0

Your way of adding is not the best way but just to answer your question, the below code should work

ActiveCell.Offset(0, 4).Value = WorksheetFunction.Sum(Range(ActiveCell.Offset(-2, 4).Address & ":" & ActiveCell.Offset(-1, 4).Address))
nightcrawler23
  • 2,056
  • 1
  • 14
  • 22