If(and(function help)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a worksheet similer to the following with data range names:

User Item Debit
Adam Lunch $1.70
Alex Milk $0.30
Alex Lunch $1.55
Adam Snack $0.50

This is the formula I can't get to compute:
=if(and(user="Adam",item="Lunch"),sum(Debit),""

Any clue as to why it will not work?
 
Close, just re-arrange some formulas. Also have to commit this with
CTRL+SHIFT+ENTER as it is an array formula:

=SUM(IF(((user="Adam")*(item="Lunch")),debit,""))
 
Because you want it to evaluate more than one row of data - try it as
an array formula

=sum(if(user="Adam",if(item="Lunch",Debit,0)))

entered as ctrl shift enter to make it an array formula
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top