Thread
:
sum a salary column using macro
View Single Post
#
3
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
sum a salary column using macro
You almost got it. Just add application. before the sum
lastrow = cells(Rows.Count,3).End(xlUp).Row
totalsum =application.sum(range("e2:e" & lastrow))
--
Don Guillett
SalesAid Software
"tango" wrote in message
om...
dear all, infact i need very simple coding but i still failed
i have this statement to count the total record to sum
lastrow = Range("C" & Rows.Count).End(xlUp).Row
now i just couldn't find a way to sum up salary column
something like this :
i know this is incorrect but i want something like this so can pass
the value to variable totalsum
totalsum = sum(range("e2:e" & lastrow))
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]