Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
matthoffman33
 
Posts: n/a
Default Using DSUM with several criteria


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: http://www.excelforum.com/member.php...o&userid=32148
View this thread: http://www.excelforum.com/showthread...hreadid=539436

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Using DSUM with several criteria

Please 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 " From May 1 until today's date" then
you say "14 days ago"?

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,"Rainfall",F1:F2)


assume the 3 column table is called "MyTable", replace with real name or
cell range, the criteria range is
F1:F2, leave F1 empty and in F2 put

=AND(A6=$C$2,B6<=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,B6<=TODAY(),B6=TODAY()-14)

then you can just change the -14 to 13,12 and so on

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com


"matthoffman33"
wrote in message
news:matthoffman33.27ctxo_1146866106.1268@excelfor um-nospam.com...

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:
http://www.excelforum.com/member.php...o&userid=32148
View this thread: http://www.excelforum.com/showthread...hreadid=539436



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
matthoffman33
 
Posts: n/a
Default Using DSUM with several criteria


Thanks Peo for the help,

It works perfectly!!!

Matt


--
matthoffman33
------------------------------------------------------------------------
matthoffman33's Profile: http://www.excelforum.com/member.php...o&userid=32148
View this thread: http://www.excelforum.com/showthread...hreadid=539436

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy DSUM Criteria Question Curtis Excel Worksheet Functions 1 February 14th 06 06:20 PM
Criteria problems in the DSUM function AA Excel Worksheet Functions 5 January 10th 06 10:16 PM
DSUM with Criteria containing non-hardcoded values? George Davis Excel Worksheet Functions 4 December 13th 05 08:11 PM
Disjoint range for DSUM criteria Jim Bennett Excel Worksheet Functions 2 June 9th 05 03:50 AM
conditional criteria in DSUM S. H. Drew Excel Discussion (Misc queries) 7 May 2nd 05 06:14 PM


All times are GMT +1. The time now is 06:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"