Please help resolving my cell value issue

LeRoy Cofield 60 Reputation points
2026-09-17T08:36:02.16+00:00

User's image

When using the following formula below in column N to calculate the value difference in column E & L, using a value of 600 to reflect a plus or minus +/- value difference in column N. IF(COUNTA($E2:L2)=0,0,ABS(SUMIFS($E2:$L2,$A2:$H2,"COFIELD")+0)-600)

The only way I can get the formula to work is to include) +0)-600) at the end of my formula to show a - (negative) value. I am also trying to resolve an issue, instead of showing a -600 value in column N when I have no data in cells A, B, C, D, H, I, J, and K, but to show a blank value until I have entered data in cells A - K,. Please see example above.

Thank you,

LeRoy

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

Answer accepted by question author
Marcin Policht 109.5K Reputation points MVP Volunteer Moderator
2026-09-17T11:24:56.1533333+00:00

It looks like the issue is that your current test is COUNTA($E2:L2)=0, which only checks columns E through L. You want column N to remain blank until there is data somewhere in A:K.

Use:

=IF(COUNTA($A2:$K2)=0,"",ABS(SUMIFS($E2:$L2,$A2:$H2,"COFIELD")+0)-600)

This does three things:

  • COUNTA($A2:$K2)=0 → if A through K are completely empty, N is blank.
  • SUMIFS(...) → finds the COFIELD row/player and obtains the applicable total.
  • +0)-600 → forces the result to numeric and allows the negative difference to display correctly. For example, 598 - 600 = -2.

So with your example, TOTAL = 598, and the result in column N is -2 instead of -600 when the row has no data.

Note that if cells A:K contain formulas that return "", COUNTA can still regard those cells as populated. If that is the situation in your spreadsheet, use this version instead:

=IF(SUMPRODUCT(--($A2:$K2<>""))=0,"",ABS(SUMIFS($E2:$L2,$A2:$H2,"COFIELD")+0)-600)

That version checks whether A:K actually contain displayed values, rather than simply whether the cells technically contain something.


If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

hth

Marcin

Was this answer helpful?

2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-09-17T08:36:17.1866667+00:00

    Use a blank check first, then run the calculation only when the input cells contain something.

    Try this in N2:

    =IF(COUNTA(A2:K2)=0,"",ABS(SUMIFS(E2:L2,A2:H2,"*COFIELD*")+0)-600)
    

    What this does:

    1. COUNTA(A2:K2)=0 checks whether cells A2:K2 are all empty.
      • If they are empty, the formula returns "" so N2 stays blank.
    2. If there is data in A2:K2, Excel calculates:
      ABS(SUMIFS(E2:L2,A2:H2,"*COFIELD*")+0)-600
    3. The +0 forces the result into a numeric calculation, which is useful when Excel may be treating a returned value as text.

    If the goal is to show the actual plus/minus difference from 600, including negative results such as -2, then this structure is correct.

    If Excel still behaves unexpectedly, use Formulas > Evaluate Formula to step through the formula and see which part is producing the result.


    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.