Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    May 2001
    Location
    New Jersey, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Adding (Excel 2000)

    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),SUM('PURCHASE ORDERS'!D))
    I wasn't sure about what to make the false part do.

    Any ideas would be appreciated.

    Thanks,
    Mark

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Adding (Excel 2000)

    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)

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Adding (Excel 2000)

    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

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Adding (Excel 2000)

    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.

  5. #5
    Star Lounger
    Join Date
    May 2001
    Location
    New Jersey, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding (Excel 2000)

    It worked.

    Thanks!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •