lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I noticed that i can not right sum() function alone like left(). what i mean by that, i have to use this syntax to call sun() function
x = Excel.WorksheetFunction.Sum(Range("a11:a20"))
however I can use left() function without using Excel.worksheetfucntion like the following
Cells(20, 3) = Left(Range("a1"), 3)
I tried to use sum() like the following
x = Sum(Range("a11:a20"))
but I got compile error msg - sub or function is not defined. Thanks
I noticed that i can not right sum() function alone like left(). what i mean by that, i have to use this syntax to call sun() function
x = Excel.WorksheetFunction.Sum(Range("a11:a20"))
however I can use left() function without using Excel.worksheetfucntion like the following
Cells(20, 3) = Left(Range("a1"), 3)
I tried to use sum() like the following
x = Sum(Range("a11:a20"))
but I got compile error msg - sub or function is not defined. Thanks