• Adding (Excel 2000)

    • This topic has 4 replies, 3 voices, and was last updated 22 years ago.
    Author
    Topic
    #387062

    I have a worksheet that I keep a list of purchase orders.
    On another sheet, I have the total dollars spent each month.

    I want to also keep track of the amount of dollars spent on raw materials.
    I added a column on the first worksheet and placed an “x” in the column for items that are raw material.
    On the totals sheet, I tried to do a “if” statement but I can’t get it to work.

    This is what I have now.
    =IF(‘PURCHASE ORDERS’!B:B=”X”,SUM(‘PURCHASE ORDERS’!D:D),SUM(‘PURCHASE ORDERS’!D:D))
    I wasn’t sure about what to make the false part do.

    Any ideas would be appreciated.

    Thanks,
    Mark

    Viewing 0 reply threads
    Author
    Replies
    • #674154

      You’ve got the order of the functions wrong: you want to SUM values IF they satisfy a condition. You can use =SUM(IF(…)), but it is easier to use the SUMIF function for this:

      =SUMIF(‘PURCHASE ORDERS’!B:B,”x”,’PURCHASE ORDERS’!D:D)

      • #674156

        A clarification point (that bites people periodically):

        You could NOT do this with a SUM(IF…) ARRAY. The Array will NOT handle a full column. You would have to do only a partial column.

        Steve

        • #674202

          Thanks Steve,

          I knew that, but didn’t mention it because in this case, it is a “normal” formula. It’s a useful tip for others who want to use a similar formula as an array formula.

      • #674211

        It worked.

        Thanks!!!

    Viewing 0 reply threads
    Reply To: Adding (Excel 2000)

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

    Your information: