View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Elkar Elkar is offline
external usenet poster
 
Posts: 964
Default Adding only part of a column of data

SUMPRODUCT might work for you. Something like:

=SUMPRODUCT(--(A1:A100=1),--(A1:A100<=8),B1:B100)

This will add all the cells in Column B with corresponding values in Column
A that are between the values 1 and 8. Adjust the cell references to meet
your needs.

HTH
Elkar


"kajones" wrote:

I have a weekly report that I send out to our team. I gather data for the
current year each month and use vlookup for most of the report. However, I
need to report some of the numbers from last year as well. I have the weeks
numbered consecutively in column A. On my report I enter the current week
number to gather the data from the vlookup. How can I get it to give me a
year to date total from the worksheet from last year? Example: I am
currently reporting week 8 numbers on my report. I can get my current YTD
number, but I need to know how to get my LY numbers for week 1-8. This will
need to change as I change the week number on my report. Does this make
sense?
--
keith jones