If generally works on one cell not a range. When you have a range within IF
you must make it an array formula, and logical functions like AND & OR
cannot be used within array formulas
So let's change horses.
This is my data
a x aaab 2
c y baaa 3
c z abaa 4
a k aaba 5
This formula =SUMPRODUCT(--(A1:A4="c"),--(B1:B4="z"),--(C1:C4="abaa"),D1:D4)
will find the single match and return the value 4.
The formula is NOT and array formula
Or course, it there were two rows matching the three criteria it will return
the sum of the two D values.
For more details on SUMPRODUCT
Bob Phillips
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
J.E McGimpsey
http://mcgimpsey.com/excel/formulae/doubleneg.html
Debra Dalgleish
http://www.contextures.com/xlFunctio...tml#SumProduct
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email
"LuisGe" wrote in message
...
I'm trying to get the value of one cell from a Data worksheet into an
specific one. The formula is as follows:
IF(AND('Data'!C5:C50003=A2,'Data'!A5:A50003=A4,'Da ta'!D5:D50003="Land"),'Data'!E5:E50003,0)
Were A2 is a country name, A4 is a date and the value to bring back is a
number.
What can I do since there is only one value in the Data spreadsheet that
would comply with all 3 conditions?