View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.newusers
Dermot
 
Posts: n/a
Default Caculating Columns Between Certain Dates

Hi Bob
I meant to post this basic shhet to dmonstrate what I am getting.

Date Company Name Amount X Amount Y Quarterly Totals Due
3.1.05 co 1 10 10 Company Start Date End Date Amount Due
5.1.05 co2 10 10
2.2.05 c01 10 10
5.3.05 c03 10 10
23.3.05 c02 10 10



"Bob Phillips" wrote:


"Dermot" wrote in message
...
Hi Bob,
I tried entering the example formula but I get an error message.
I was prompted to use the formula construction below

SUMPRODUCT(Array 1,[Array2],[Array3],...)
so I entered
=SUMPRODUCT(A2:A200= --"2005-01-01",[A2:A200,<=
"2005-03-31"],[B2:B200="company_name"],[C2:C200+D2:D200])



The format you are seeing is the standard SUMPRODUCT formula, what I gave
you is a variation you will not see documented in the help files. The page I
gave in the last post gives a good explanation.

It is important that you neter the formula as supplied, if you muck about
with it, don't be surprised if it doesn't work. The only thing you should
change are the real cell ranges, and the test values, company name & dates.
The formula should be

=SUMPRODUCT(A2:A200= --"2005-01-01",(A2:A200,<=--"2005-03-31"),(B2:B200="co
mpany_name"),(C2:C200+D2:D200))

When you see [...] in help, it doesn't mean that you use the square
brackets, it means that those parameters are optional.

I wasn't too sure about the dashes you have included --"2005-01-01"
Can you tell me what they do?



I use the -- to coerce the text date string into an Excel date that the
formula can work with. Some people use DATE(2005,01,01), that is just my
preference, as it is slicker and uses an ISO standard date format, as I am
UK based we suffer with Excel dates, so an ISO standard helps to make our
life easier.