Hi,
I have three columns. They are Station, Date, and Rainfall. This
database will go from May 1 'till today's date with several stations
included. I want to add up all of the rainfall amounts from one station
from May 1 'till 14 days ago, 13 days ago, 12 days ago, and so on up to
today. I've been trying to use the DSUM function but I need to add in
the second set of criteria so it will only add the amounts up untill
however many days ago. Any suggestions??
Thanks,
Matt--
matthoffman33
------------------------------------------------------------------------
matthoffman33's Profile: www.excelforum.com/member.php...oamp;userid=32148
View this thread: www.excelforum.com/showthread...hreadid=539436Please refrain from multiposting, I realize that this might be your first
post but multiposting is frowned upon in these forums, if you need to post
to more than one group do crosspost, that way a responder will see that a
question has been answered already. Here's the answer I gave you in the
other newsgroup
I don't understand what you mean by quot; From May 1 until today's datequot; then
you say quot;14 days agoquot;?
If the date starts with May 1st and today is May 5th, that is only 5 days or
do you mean in the future when today is May 14th? Anyway you can most
definitely use more than one criteria with the D functions but you might
need a formula for the criteria
=DSUM(MyTable,quot;Rainfallquot;,F1:F2)assume the 3 column table is called quot;MyTablequot;, replace with real name or
cell range, the criteria range is
F1:F2, leave F1 empty and in F2 put
=AND(A6=$C$2,B6lt;=TODAY())
where A6 is the first cell in the Station column with data (not header) and
C2 is the cell where you put
the name of the station, note the absolute reference, that is necessary. B6
is the first cell with the data in the dates column. This formula will sum
all the station in C2 where the date is less than or equal to today,
if you want 14 days from today and until today change the formula to
=AND(A6=$C$2,B6lt;=TODAY(),B6gt;=TODAY()-14)
then you can just change the -14 to 13,12 and so on
--
Regards,
Peo Sjoblom
nwexcelsolutions.comquot;matthoffman33quot; gt;
wrote in message
news:matthoffman33.27ctxo_1146866106.1268@excelfor um-nospam.com...
gt;
gt; Hi,
gt;
gt; I have three columns. They are Station, Date, and Rainfall. This
gt; database will go from May 1 'till today's date with several stations
gt; included. I want to add up all of the rainfall amounts from one station
gt; from May 1 'till 14 days ago, 13 days ago, 12 days ago, and so on up to
gt; today. I've been trying to use the DSUM function but I need to add in
gt; the second set of criteria so it will only add the amounts up untill
gt; however many days ago. Any suggestions??
gt;
gt; Thanks,
gt;
gt; Matt
gt;
gt;
gt; --
gt; matthoffman33
gt; ------------------------------------------------------------------------
gt; matthoffman33's Profile:
gt; www.excelforum.com/member.php...oamp;userid=32148
gt; View this thread: www.excelforum.com/showthread...hreadid=539436
gt;
Thanks Peo for the help,
It works perfectly!!!
Matt--
matthoffman33
------------------------------------------------------------------------
matthoffman33's Profile: www.excelforum.com/member.php...oamp;userid=32148
View this thread: www.excelforum.com/showthread...hreadid=539436
- Jan 24 Wed 2007 20:35
Using DSUM with several criteria
close
全站熱搜
留言列表
發表留言