sum data in column for dates until today

J

jonnel

Hi,

I'm working on a worksheet where column A contain all the dates of thi
year (january 1 in A1, january 2 in A2, etc) an column B contains value
that I want to summate. However, I only want to summate the values i
column B from january 1 till today. The values in the other cells o
column B (corresponding to dates later in the year) should not b
summated (yet). So the summation should change automatically dail
(because the current date should now be included in the summation)
Does anybody know how I can achieve this?

Tnx,
Joh
 
G

Guest

Try:

=SUMPRODUCT(--(A1:A366<=Today()),--(B1:B366))

You cannot use "whole" columns with SUMPRODUCT i.e. A:A is not allowed.

or

=SUMIF(A:A,"<=" & TODAY(),B:B)

HTH
 
J

jonnel

Toppers said:
Try:

=SUMPRODUCT(--(A1:A366<=Today()),--(B1:B366))

You cannot use "whole" columns with SUMPRODUCT i.e. A:A is not
allowed.

or

=SUMIF(A:A,"<=" & TODAY(),B:B)

HTH
[/QUOTE]

Hi,
The first formula doesn't work (I just copied and pasted it), but the
2nd one absolutely does! So thanks a lot! :)
John
 
G

Guest

.... SUMPRODUCT should work .. it does for me.

But you have a solution ...


Hi,
The first formula doesn't work (I just copied and pasted it), but the
2nd one absolutely does! So thanks a lot! :)
John
[/QUOTE]
 

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

Top