+ Reply to Thread
Results 1 to 6 of 6

Thread: sumif

  1. #1
    Registered User
    Join Date
    08-25-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    34

    sumif

    How would I add the cost and labor on tab cost to the main tab column name Total for each line. I am also trying to match the type and error name to get the correct price to add together

    I tried the function
    SUMIFS(sum(Cost!$C$2:$C$7:Cost!D2:D7),Cost!$A$2:$A$7,B2,Cost!$B$2:$B$7,C2)
    Attached Files Attached Files
    Last edited by Batman11692003; 10-15-2011 at 01:27 PM.

  2. #2
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,180

    Re: sumif

    One way:

    =INDEX(Cost!$C$2:$C$7,MATCH(Main!$B8&Main!$C8,Cost!$A$2:$A$7&Cost!$B$2:$B$7,0))+INDEX(Cost!$D$2:$D$7 ,MATCH(Main!$B8&Main!$C8,Cost!$A$2:$A$7&Cost!$B$2:$B$7,0))

    Committed with Ctrl-Shift-Enter rather than just Enter

    Regards

  3. #3
    Registered User
    Join Date
    08-25-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: sumif

    I got a #Value error

    i tried it on E2
    =INDEX(Cost!$C$2:$C$7,MATCH(Main!$B2&Main!$C2,Cost!$A$2:$A$7&Cost!$B$2:$B$7,0))+INDEX(Cost!$D$2:$D$7 ,MATCH(Main!$B2&Main!$C2,Cost!$A$2:$A$7&Cost!$B$2:$B$7,0))
    Last edited by Batman11692003; 10-15-2011 at 01:20 PM.

  4. #4
    Forum Guru Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    5,572

    Re: sumif

    Not sure what you are asking here.

    If you want to keep Sheet "Main" Column D
    In E2
    =SUM(D2,SUMIFS(Cost!$D$2:$D$7,Cost!$A$2:$A$7,B2,Cost!$B$2:$B$7,C2))
    Drag/Fill Down

    If you want to combine Cost and Labour in one formula
    =SUM(SUMIFS(Cost!$C$2:$C$7,Cost!$A$2:$A$7,B2,Cost!$B$2:$B$7,C2),SUMIFS(Cost!$D$2:$D$7,Cost!$A$2:$A$7,B2,Cost!$B$2:$B$7,C2))
    Drag/Fill Down

    Note
    Your profile states you are using 2003 however your file and formula are for 2007 and above.
    This will not work in 2003
    Last edited by Marcol; 10-15-2011 at 01:39 PM.
    If you need any more information, please feel free to ask.

    However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
    Also
    If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.

  5. #5
    Registered User
    Join Date
    08-25-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: sumif

    Thanks for all the help

    I was looking to combine Cost and Labour in one formula

  6. #6
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,180

    Re: sumif

    Note:

    Committed with Ctrl-Shift-Enter rather than just Enter
    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0