lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
The code below is not giving me any error message but it does not name the range a1:a10 to myrange and the sum function does not work? Any help would be very much appreciated. Thank you.
The code below is not giving me any error message but it does not name the range a1:a10 to myrange and the sum function does not work? Any help would be very much appreciated. Thank you.
Code:
Sub insert_formula()
Range("a1:a10").Name = "myrange"
Cells(11, 1).Formula = "=sum(myrange)"
End Sub