• Array formulas

    Author
    Topic
    #353169

    I am working on revamping my organization’s expense report. I’ve been trying to figure a total based on two conditions. Here’s an example of what I’m trying to accomplish: if a cell in the range of B6:B30=A and a cell in the range of F6:F30=520 then I want to add their totals, but only if they’re in the same row. For instance if B8 has an A and F8 has 520, then I want whatever is in the row 8 total column added to all the other “A520″s. I searched Microsoft’s website, figured out I needed to use an array formula, and found some samples. It seemed like the SUMIF function was what I should use. I tried these formulas and neither worked: {=SUM(IF((B6:B30=”A”)*(F6:F30=”520″),G6:G30))}and {=SUM(IF((B6:B30=”A”)+(F6:F30=”520″),G6:G30))}. Then I posted this question on a local helpnet, and someone suggested I try this: {=SUM(IF(B6:B30=”A”,IF(F6:F30=”520″,G6:G30)))}. That didn’t work either. Does anyone have any suggestions as to what may be going wrong here? Any help would be greatly appreciated!

    Thank you,
    Amy

    Viewing 1 reply thread
    Author
    Replies
    • #515841

      Hi Amy,
      My first thought would be to check if your 520s are text or numbers. I think most of those formulas might work if you changed the =”520″ bit to =520 (Excel won’t equate the number five hundred and twenty with “520” if you see what I mean – one is text, the other is a number.)
      Hope that helps.
      PS I’ve assumed you aren’t typing the curly braces in manually but rather are array-entering it – i.e. typing =SUM(IF(B6:B30=”A”,IF(F6:F30=520,G6:G30))) then pressing Control-Shift and Enter?

    • #515847

      Rory is correct. Does the attached meet your requirements?

      Bob_D

    Viewing 1 reply thread
    Reply To: Array formulas

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: