View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Total varying no of columns

=Sum(Offset(L2,0,0,1,$H$2))

Assume you are summing each row separately. If the column count varies by
row and column H has the week number, take the $ signs off H2.

Now drag fill your formula downt the column.
--
Regards,
Tom Ogilvy



wrote in message
oups.com...
I had originally posted this yesterday to Worksheets function but the
Group doesn't seem to be active.

I am trying to total columns L2:AA2 (there are 400 rows) but the no of
columns to be totalled will be based on a week number in H2. For
example, current week no is 2 so Excel would total L2+M2. The week no
increases by 1 every week.
Can it be done?

Thanks
Tony