Zero Minus One Equals Zero?

ncorkren

New Member
Joined
Jun 29, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
I have a formula "=$M16-COUNTIF(S3_Components,$B16)" where $M16 contains the result of a different formula equaling 0 (zero), "S3_Components" is a named range containing text values, and $B16 contains a text value to be counted within the named range.

The COUNTIF formula returns the value of 1, but the whole formula =$M16-COUNTIF(S3_Components,$B16) is returning 0.

I stepped through the formula using "Evaluate Formula" on the Formulas tab (see the snips). Why is this formula calculating 0 - 1 = 0 ???

eval1.JPG



eval2.JPG

eval3.JPG

eval4.JPG

eval5.JPG

T
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Well ... step away from the formula and take a fresh look. In plain ole math .... if you have NOTHING and take ONE AWAY you still have nothing. You can't take anything away from NOTHING.

Hopefully, this is how the formula is working as well. ????
 
Upvote 0
Well ... step away from the formula and take a fresh look. In plain ole math .... if you have NOTHING and take ONE AWAY you still have nothing. You can't take anything away from NOTHING.

Hopefully, this is how the formula is working as well. ????

Is this a joke? Lol

In plain ole math, zero minus one equals negative one:
0 - 1 = -1
 
Upvote 0
What formula in M16? Does it relate to range B:B?
Check whether "Circular Reference" warning appear in left-lower corner of screen?
In some cases, "Circular Reference" cause weird calculation.
 
Upvote 0
Solution
What formula in M16? Does it relate to range B:B?
Check whether "Circular Reference" warning appear in left-lower corner of screen?
In some cases, "Circular Reference" cause weird calculation.
This was it! Long story short: The range S3_Components was actually dependent on M16 (among other things). I thought normally there would be a warning box that popped up to prevent such a thing, but not this time.
 
Upvote 0

Forum statistics

Threads
1,215,840
Messages
6,127,214
Members
449,369
Latest member
JayHo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top