View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Lars-Åke Aspelin[_2_] Lars-Åke Aspelin[_2_] is offline
external usenet poster
 
Posts: 913
Default how to sum with this table

On Sun, 14 Dec 2008 03:12:10 -0800, Andrea
wrote:

Hello,
My question is the follow. I've a table like this:

DATA A01_x B01_y D04_x A01_y C03_k

01/01 5 3 12 4 6
01/10 7 5 14 6 8
01/12 5 15 9 14 6
01/25 9 5 8 13 1
02/05 12 11 11 13 7
02/06 13 8 6 1 5
03/17 17 12 2 6 18
03/08 1 15 10 5 17
04/09 6 10 10 3 12
04/10 16 11 7 14 4


I need to sum the values of column D04_x if month is the highest (I didn't
specify "April" because I need to have an authomatic updating data if month
changes, without modify formula every needs).
Columns position could change according conditions I extract data from my
server database.
Thanks everybody will give to me a right advice.

Andrea


Assuming that your columns of dates is column A and that your columns
of D04_x is column D, and that the data starts on row 3 i those
columns, you may try the following formula:

=SUMPRODUCT((MONTH(A3:A100)=MONTH(INDEX(A1:A100,MA X(NOT(ISBLANK(A3:A100))*(ROW(A3:A100))))))*(D3:D10 0))

change the 100 on four places to fit the number of rows with data that
you have. Note that the A1 should not be changed.

The formula will return the sum of D04_x for those rows that have the
same month as the last date entered in column A.

Hope this helps / Lars-Åke