Thread: Sum Columns
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Sum Columns

=SUM(OFFSET($B3,,,,MATCH($A$1,2:2,0)-1))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Soniya" wrote in message
oups.com...
Hi All,

I have the Following in my worksheet

A1 contains a month end date for eg. 30-04-05

B2 C2 ..... AK2 AM2
31-1-03 28-2-03 ..... 31-12-05 TOTAL
100 250 ..... 425 xxxx
250 150 ..... 200 xxxx

I want to get the total based on the date in my A1. For eg if A1
containd 31-3-04 in my AM3 the total shud be sum(B3:P3) (31-01-03 to
31-03-04)

so when ever I change the date in my A1 my total column shud take from
31-1-03 up to the column in which the same date appears.

Is there an easy way to acheive this either thru code or formulae?

thanks