![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 40
|
which is the right thing to use to add the following scenerios? (Sp)
A....I......I...G..I DatesI......IvaluesI Add anything in g:g where column a is due between: today and 15 days ago, sumif(a:a,(between?)today() & today()15, G:G)? 16 & 30 days ago 31 & 60 days ago you get the idea I just can't seem to figure out how to tell excel the (Between) part [ This Message was edited by: mapakunk on 2002-05-16 10:08 ] |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
=SUMIF(A:A,">="&TODAY()-15,G:G) BTW, logically the foregoing is sufficient for from 15 days ago up to TODAY(). "16 & 30 days ago" would be: =SUMIF(A:A,">="&TODAY()-30,G:G)-SUMIF(A:A,">"&TODAY()-16,G:G) The SUMPRODUCT version of the latter would look like: =SUMPRODUCT((A2:A100>=TODAY()-30)*(A2:A100<=TODAY()-16),G2:G100) SUMIF is cheaper, should therefore be prefered above SUMPRODUCT whenever possible. Another alternative is of course DSUM (whose set up is not easy when the required formula must be copied down/across for similar conditions). Aladin [ This Message was edited by: Aladin Akyurek on 2002-05-16 10:35 ] |
|
|
|
|
|
|
#3 |
|
New Member
Join Date: May 2002
Posts: 40
|
Aladin,
Thank you for your assistance so far. You have helped me a great deal. So what I am seeing is that the reason I was having trouble was because my '<' signs were not in " ". Why do they need to be in quotes. I thought those were for text strings... |
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
|
|
|
|
|
|
|
#5 |
|
New Member
Join Date: May 2002
Posts: 40
|
Wow. There sure is alot going on in the background of this crazy program isn't there.
Thanks again mapakunk |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|