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

That did it. Thanks,
--
keith jones


"Sheeloo" wrote:

Here is the idea...

Suppose you want to SUM the numbers in Col A from A1 to say A10
then enter 10 in B1 and this formula in C1
=SUM(INDIRECT("A1:A"&B1))
Now if you change B1 to 20 it will give you sum of A1:A20...

You can adapt this to your requirement... basically build a string (using
strings and references) giving you the range to SUM, pass it to INDIRECT and
then put a SUM around Indirect...

"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