Hi,
I am trying to subtract and add a range of cells in VBA, but I keep getting a run-time error 13 Type mismatch error. Can anyone help, here is my code -
I want the value of G55 to be G56-SUM(G20,G31,G40,G49,G53,G54), I am not sure how to fix this.
I am trying to subtract and add a range of cells in VBA, but I keep getting a run-time error 13 Type mismatch error. Can anyone help, here is my code -
Code:
ActiveSheet.Range("G55").Value = Range("G56").Value - WorksheetFunction.Sum(Range("G56"), Range("G20"), Range("G31"), Range("G40"), Range("G49"), Range("G53:G54"))
I want the value of G55 to be G56-SUM(G20,G31,G40,G49,G53,G54), I am not sure how to fix this.