View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Sum a Range of Cells

myVar = Application.Sum(Activecell.CurrentRegion)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"wutzke" wrote in message
...
I have sets of cells that are maybe 7 columns wide by 5 rows deep,
followed by another 12 columns wide by 2 rows deep, then another just
5 rows by 5 columns.

Something similar to
http://spreadsheets.google.com/ccc?k...RycNcWUQ&hl=en

How would I create a function that passes the sum of any grid to a
varable, no matter the dimension of the grid?