+ Reply to Thread
Results 1 to 6 of 6

Conditional If statements

  1. #1
    Registered User
    Join Date
    03-15-2008
    Posts
    3

    Thumbs up Conditional If statements

    Okay, I have this spreadsheet where I must sum the totals of a column of data only if it matches two seperate criteria. In it I must seperate the rework created by each line per crew.

    This is the formula I am trying (and have tried multiple variations of the same) where A is the crew, B is the line, and C is the rework:

    =IF($B$2:$B$17=1, SUMIF($A$2:$A$17,"=1",$C$2:$C$17), 0)

    Seems logical to me, but it delivers incorrect data. Can anyone help me?
    Here is the attached file:
    Attached Files Attached Files

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,739
    This is a job for SUMPRODUCT. Try this formula in F3 copied down

    =SUMPRODUCT(($A$2:$A$17=$E3)*($B$2:$B$17=1), $C$2:$C$17)

  3. #3
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    199
    If I understood your post and test worksheet correctly, you want to add up the "Rework" totals if Crew & Line =1,2,3 & 4 Respectively. So, for example, Crew 1 should add up to 13 as the only row where the Crew and Line = 1 is in row 14 of your sheet, and C14 = 13. Is that correct?

    If so, put this formula in F3 and copy down.

    =SUMPRODUCT(--($A$2:$A$17=$E3),--($B$2:$B$17=$E3),$C$2:$C$17)

    Hope that helps.

  4. #4
    Registered User
    Join Date
    03-15-2008
    Posts
    3
    Wow, that worked great. Thanks! Now...how does it work?

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,739
    If you want to understand SUMPRODUCT here's a good place to start

  6. #6
    Registered User
    Join Date
    03-15-2008
    Posts
    3
    Thank you so much for your help everyone.

+ 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.6.0 RC 1