Excel - is it possible to exclude data in a result cell based on =IF formula

Lee Jefferies 20 Reputation points
2026-06-12T15:49:45.0333333+00:00

I have the following formula pulling data:

=SUMPRODUCT((Fixtures!$C$2000:$C$2104=$B43)*(Fixtures!$E$2000:$E$2104>Fixtures!$F$2000:$F2104))

Is it possible to add to this formula a way to stop it using the data in the fields if another cell in the origin “Fixtures” tab shows information eg. Yes.

In Fixtures!B2000:B2104 l want to show “Yes” to exclude the data in C,E & F columns from being used. If the B column is blank the data is C,E & F would be used.

Hopefully that makes sense!!

Thanks

Microsoft 365 and Office | Excel | For home | Windows
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-06-12T15:49:58.55+00:00

    Use an extra condition in the SUMPRODUCT that checks column B and only includes rows where B is blank.

    Adjust the ranges so they all match (2000:2104) and add the B-column test:

    =SUMPRODUCT(
      (Fixtures!$C$2000:$C$2104=$B43)*
      (Fixtures!$E$2000:$E$2104>Fixtures!$F$2000:$F$2104)*
      (Fixtures!$B$2000:$B$2104="")
    )
    

    Explanation:

    • (Fixtures!$B$2000:$B$2104="") returns 1 for rows where B is blank and 0 where B contains "Yes" (or anything else).
    • Multiplying this by the other conditions makes SUMPRODUCT ignore rows where B is not blank.

    If instead you want to explicitly exclude only rows with "Yes" and allow other text, use:

    =SUMPRODUCT(
      (Fixtures!$C$2000:$C$2104=$B43)*
      (Fixtures!$E$2000:$E$2104>Fixtures!$F$2000:$F$2104)*
      (Fixtures!$B$2000:$B$2104<>"Yes")
    )
    

    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.