dimanche 26 février 2017

Excel unwanted behavior when using IF function

I'm lost on this one. My goal is to have a table conditionally fill itself out based on whether or not a certain cell has the letter "x" in it. Each remaining cell in the row contains one of three things: nothing, a "1", or a "0". When there is no "x" present in the designated cell, all 1's in that row become 0's. The blank spaces remain blank spaces. Here's what a given row looks like:

  A      B     C     D     E     F     G     H
Item 1   x     1           1     1           1
Item 2   x           1     1     1     1     
Item 3   x     1     1           1     1      

And here's what should happen if I get rid of the "x" for Item 1:

  A      B     C     D     E     F     G     H
Item 1         0           0     0           0
Item 2   x           1     1     1     1     
Item 3   x     1     1           1     1      

Unfortunately, I'm seeing some undefined behavior. If I remove one of the "x"s and press enter, the zeros populate in the right place and everything is fine. If I try adding that "x" back, however, the zeros turn back into ones AND some of the blank cells populate with ones. The weirdest thing is that not all of the blank cells populate with one, just seemingly random ones (though the same every time).

I checked those cells for any formulas, cleared the contents of those cells just to be safe, and I'm still seeing this behavior. Any ideas?

Aucun commentaire:

Enregistrer un commentaire