View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
tango tango is offline
external usenet poster
 
Posts: 45
Default sum a salary column using macro

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))