View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier Roger Govier is offline
external usenet poster
 
Posts: 2,886
Default Help on sumproduct function

Hi David

If they don't change format, they're presumably text, not dates, so
your test won't evaluate appropriately


Just a quick "heads up"
Whether it is an Excel date or Text '23 May 2007, the Text function
returns 2007May23

--
Regards

Roger Govier


"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
You've used the double unary minus to transform one of your booleans
to a number, but you may need to do the same for your other two
boolean expressions.

Also, if your example is representative, your dates may not really be
dates, but may be text that looks like dates. You can check by
temporarily changing the format of your date cells to general or
number, and see whether 23-May-07 becomes 39225, etc. If they don't
change format, they're presumably text, not dates, so your test won't
evaluate appropriately.

If you're still struggling, add helper columns with each test
condition separately, so that you can see which tests are passing and
which failing.
--
David Biddulph

"sadat" wrote in message
...
Hello,
My problem is that I have data in four columns. First column has the
data
which is mixed of text and numbers (Eg. KAM-1000), second column has
date
(Eg. 23-May-2007), third column has text that is different types of
product
name, last column is the price of the products. I want to sum up the
last
column if all the three columns matches three different criteria. I
am giving
an example of the data below:
ID Date Product Name Price
KAM-1000 23-May-07 Apple 400
KAM-1001 24-MAY-07 Orange 100
KAM-2000 25-MAY-07 Grape 200
KAM-1000 23-May-07 Apple 300
Now I want the function to sum up the row 1 and 2 and give a result
of 700.
I used this formula but it resulted 0:
=SUMPRODUCT($A$221:$A$224="KAM-1736",$G$221:$G$224="Business
Solutions -
Dhaka",--(TEXT($E$221:$E$224,"yyyymmmdd")="2007May23"),$M$2 21:$M$224)
What should I do? Is there any other function which will give me the
accurate result?

Thanking you in advance