For a detailed explanation of how this works, check Chandoo's article "
Advanced Sumproduct Queries".
Particularly read the "Scenario 4: Sum values within a 2D Range matching multiple ordered criteria" section.
Explained are what SUMPRODUCT does, and what adding and multiplying do. There is a sample workbook to go along with the article.
-- isn't used in that article, because it is only required in certain circumstances to force conversion to 1 and 0; the conversion to 1 and 0 from true and false can happen in other ways (I'll be vague unless you want more details).
I will just add that
Code:
SUMPRODUCT (blablabla) is equivalent to an array formula of the form [code]SUM(blablabla), but with no need for ctrl-shift-enter when typing the formula.
SUMPRODUCT can also take multiple arguments, though: [code]SUMPRODUCT(blablabla,blablabla,blablabla...)
which actually would be equivalent in an array formula to: SUM((blablabla)*(blablabla)*(blablabla))[/code] .. this is the reason for the word "product" in "SUMPRODUCT".
You might want to just ignore array formulas for now and use SUMPRODUCT. Usually the only time you have to use an array formula instead of SUMPRODUCT is if you want to do something beside summing the result.
.
Also good reading from Chandoo: "
What is Excel SUMPRODUCT formula and how to use it?" for a basic introduction.
.
In the case of the example formula from me that you quoted:
well let me try to explain the formula as you placed...if am wrong so do correct me

.... -- or * is used to interlink the two criteria togehter is say if The A2 : A10(Data range_row) = is equivalent to F22:I22 (range_column) or greater then 0 so only then Sum A2 : A10(Data range_row) = is equivalent to F22:I22 (range_column) or greater then 0
rite!!... well but !!! what will be the result ? :S will it sum the values in a1 to a10 of f22 to I22 ????
Not exactly---or else I didn't quite follow you

.
.
I'll "illustrate" it for you.
The following formula:
=SUMPRODUCT(--($A$2:$A$10=$F22:$I22))>0[/code]
is evaluated in many steps by Excel, in an array (2-dimensional matrix) calculation, as follows:
stage step calculation___________________ result_________________________
1A 1. $A$2=$F22 True or False
2. --(True or False) 1 or 0
1B 1. $A$2=$G22 True or False
2. --(True or False) 1 or 0
1C 1. $A$2=$H22 True or False
2. --(True or False) 1 or 0
1D 1. $A$2=$I22 True or False
2. --(True or False) 1 or 0
2A 1. $A$3=$F22 True or False
2. --(True or False) 1 or 0
2B 1. $A$3=$G22 True or False
2. --(True or False) 1 or 0
2C 1. $A$3=$H22 True or False
2. --(True or False) 1 or 0
2D 1. $A$3=$I22 True or False
2. --(True or False) 1 or 0
3A 1. $A$4=$F22 True or False
2. --(True or False) 1 or 0
3B 1. $A$4=$G22 True or False
2. --(True or False) 1 or 0
3C 1. $A$4=$H22 True or False
2. --(True or False) 1 or 0
3D 1. $A$4=$I22 True or False
2. --(True or False) 1 or 0
...etcetera, all the way through......
9A 1. $A$10=$F22 True or False
2. --(True or False) 1 or 0
9B 1. $A$10=$G22 True or False
2. --(True or False) 1 or 0
9C 1. $A$10=$H22 True or False
2. --(True or False) 1 or 0
9D 1. $A$10=$I22 True or False
2. --(True or False) 1 or 0
and then,
10 SUM(1A:9D step 2 results) a number between 0 and 36
11 (a number between 0 and 36)>0 True or False
This results in an OR logic because each match between a criteria and your data results in a 1, then all the 1s are added up, and if the result is >0 then 1 or more matches had been found.
Chandoo's article has illustrations to show what the matrices look like to Excel when evaluating this type of formula.
To reiterate, -- forces 1s and 0s. Adding 1s and 0s gives you a count of 1s. If more than 0, you had at least 1 "1" ("OR" logic).
As to the * multiplication operator, it results in "AND" logic because 0 times anything = 0, and 1 times 1 = 1. So if ANY 0s are present in a string of numbers multiplied, the result will always be 0. Check for =1 and you will get True/False indicating that all conditions were met in all cases.
.
I tend to misspeak sometimes, and I realize after illustrating this example, that my previous statement of another way to do an AND test is incorrect. I said:
addition, then test for =#_of_criteria : AND LOGIC
Obviously if you have 4 criteria cells and 9 cells to compare to, the result would be 4*9 1s and 0s ----- up to 36 when added together. So for all criteria to be met for all 9 tested cells, you would have to check for =36, or =4*9. I had some circumstance recently requiring this logic instead of the usual multiplication = 1 test... I forget why, though.
Hope this helps.
Asa
EDIT:
hahaha.. the "recent circumstance" was earlier in this thread when I gave you the short calculation for an AND test on a vertical range of data and a horizontal range of criteria...
I apologize for the mistakes. I will add another post in a moment correcting for my error and give you a new AND formula and a new combo formula with "AND" and "OR".