How to use #AND# in an if or sumif

J

Jim

Back in the old Lotus 123 days, I remember being able to use #AND# or #OR# in
a condition statement. How is this done in Excel?

For example, if I wanted to use =SUMIF and sum only items where column A met
criteria 1 and colum B met criteria 2, how would I do that?
 
K

Karsen

The format to use And / OR in Excel is as such:

AND(condition1, condition2...conditionN)

For example, the formula =IF(AND(c1=1,d1=2),e1,f1) would return the
contents of e1 if the content of c1 is 1 and the contents of d1 is 2.
Otherwise the result would be the contents of f1.
 
Top