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


"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.