Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Total varying no of columns

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Total varying no of columns

Perfect. Thank you Tom.

Regards
Tony

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookup columns (varying qty), then find MIN NRath Excel Worksheet Functions 6 February 8th 10 09:58 PM
Total column changes colors when total equals sum of other columns newstacy New Users to Excel 1 April 21st 07 09:00 PM
Summation of columns of varying heights? Jeff B Excel Discussion (Misc queries) 1 June 15th 06 10:41 PM
how do i add up 3 columns to get a total dekmag New Users to Excel 5 December 26th 05 08:00 PM
Transpose rows to columns w/varying numbers of lines per record MG Excel Worksheet Functions 8 November 11th 05 01:01 AM


All times are GMT +1. The time now is 02:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"