I have an Excel (2010) cell with this formula:
{=SUM(IF('Tasks'!$I:$I=$C4,'Tasks'!$F$2:$F$2000,0))}
which works (the correct total is given). But when I enter another item to search for:
{=SUM(IF(AND('Tasks'!$H:$H=B4,'Tasks'!$I:$I=$C4),'Tasks'!$F$2:$F$2000,0))}
it does not work (total is zero). Does AND not work in this case? Or have I made an error?
Explanation of code: I have two sheets, a Total sheet (where this code is placed) and a Tasks sheet. The Tasks sheet contains work priority (in H column), people (in I column) and estimated time (in F column). So I want to find out, per person and per tasks priority, how much work is estimated. The first line of code is just estimated time per person which, as I wrote, works fine. On the Total sheet, B4 contains the priority of the current item and C4 the name of the current person.
next rowwhen the condition is satisfied, e.g. if I99 = C4 then F100 is added to the sum.....I assume you don't want it to work like that.... – barry houdini Dec 20 '12 at 12:53$F:$Fbut then I saw that it confuse people reading your answer (containingF2:F2000). Is that where the VTC comes from? – Wikis Dec 20 '12 at 13:19