SUMIF function

  • Thread starter Thread starter Igor
  • Start date Start date
I

Igor

Hi

Is it possible to use AND in SUMIF function. I have a simple table with
three columns. The first column contains dates in chronological order. I
want to use SUMIF function to sum values from the second column but only for
a specific period of time (ie one year).
For example: =SUMIF(A2:A25;"<38353";B2:B25) sums all values before year
2005, so 2004, 2003, etc.. How should the function look like to sum values
only for one year, 2004 for instance.

Kind regards
 
First, I'd use:
=SUMIF(A2:A25;"<"&date(2005;1;1);B2:B25)
That number 38353 may not always represent Jan 1, 2005. It'll depend on how the
base date is set (1900 or 1904).

=sumproduct(--(text(a2:a25;"yyyy")="2004");b2:b25)

(watch out. I _think_ I got all my commas changed to semicolons!)
 
=SUMIF(A2:A25;"<38353";B2:B25)-SUMIF(A2:A25;"<37987";B2:B25)
or
=SUMPRODUCT((A2:A25<38353)*(A2:A25>=37987)*(B2:B25))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

SUMIF() to add cells in non-contiguous ranges? (Excel 2003) 4
Nesting SUMIF within SUMPRODUCT 10
Sumif Function 2
SUMIF 4
SumIf AND 6
How do I use sumifs - 1
SUMIF and text 3
Sumif across a table 1

Back
Top