Dsum will not work

G

Guest

This is driving me nuts, because is seems fairly simple, and I have gotten
Dsum functions to work before...

The database criteria is a list with (2) columns, and i include the column
headings. One column is days of the month (1,2,3,4,5,etc.) all the way to
31. The second column is total charges for that day.


5 B C
5 Date Total Charges
6 1 -
7 2 -
8 3 467,981
9 4 1,065,528
10 5 1,238,425
11 6 422,813
12 7 444,759
13 8 17,777
14 9 467,611
15 10 1,768,842

I want to add a Dsum function to a cell that sums total charges for the
month through a day specified (Ex day 5). Here is the criteria range:

A
74 Date
75 <=8

So the function I use is: =DSUM(B5:C15,2,A74:A75)

I do not get an error, it just produces a zero. If I just use an '8' as a
critera without the lesser than and equals sign, it totals all the charges
(all of column C) in the range. I have played with this, and if I expand the
range and use a different criteria, it works fine.

Alos, ultimately, I want the criteria to be a formula, so the user can add
the date to another cell and have the criteria change to ex: '<=D2' I
originally thought that might be the tricky part.

Thanks in advance.

DEI
 
G

Guest

Try something like this, instead of DSUM:

=SUMIF(B5:B15,"<="&A75,C5:C15)

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro
 

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


Top