View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bpeltzer bpeltzer is offline
external usenet poster
 
Posts: 171
Default Sum column A:? where ? is a number in a cell somewhere

You didn't indicate which row(s) you need to add. If you need rows 5 and 6,
for example, and the number of months is in cell A1 you could use
=sum(offset($AW$5,0,-A1,2,A1))


"Murray" wrote:

I have a column for each month of the year and I need to compare this year
to date with last year to date and the previous year and the previous year
etc. I would like to enter a 1 to 12 in a cell somewhere that will allow me
to sum a row (where January 2004 is in column AV, Feb is in AU etc and the
more recent years are closer and closer to column A). So for year 2004 year
to date to May would sum AV to AR based on the number 5 inserted in cell A1
and June would sum AV to AQ based on the number 6 etc.

I am aware of OFFSET etc features but do not know the syntax to get it
right. Please help.