View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ryguy7272 ryguy7272 is offline
external usenet poster
 
Posts: 2,836
Default Summing an unkown number of columns

Look at this site:
http://www.ozgrid.com/Excel/DynamicRanges.htm

Look at the example after #7.
It reads "You can also change the Columns..........."

Regards,
Ryan---

--
RyGuy


"Flick Olmsford" wrote:

I am running Excel 2003

Why not just sum from column D to column IV (i.e. D4:IV4). Any empty
cells will be treated a zero.



"lesley1000" wrote:

I put into Excel weekly figures (there change each week and time I put them
in). I want to do a sum of the row at the end to generate a total. Doing this
in excel is fine, but I want the code to sum from column D (this is fixed
each week) until the last column, which will be different each time I run the
macro. I've tried naming the cells, but VBA doesn't do it correctly, it will
do a fixed number of columns. Any suggestions?