Brandon's Blog

3/31/2011

The Egg Actually Is the Chicken

In Excel, there is a difference between a blank cell and a cell with no value.  It is impossible to force a cell to be blank via a formula, because the presence of a formula makes the cell not blank.

This might seem like an asinine thing to worry about, but blank cells can be important when doing certain gambits like special pastes that avoid writing over labels on rows and columns, or values that come from another source and should not be destroyed.  These non-blank empty cells steamroll anything standing in their way, contrary to the perceptible logical state of the spreadsheet.

If you put the formula =“” into the cell, that’s saying, “This cell should be blank.”  If you copy and paste values only (destroying the formula) into a new unused cell, despite having nothing in it (no detectable sign you did anything in that cell, unless you just remember), Excel still sees this as a non-blank cell… because you pasted nothing from a non-blank cell.  It’s tainted.  The only way to clear it out is to press the delete key while on top of it.

So, it’s basically hopeless.  You’re squarely in macro-land to solve that problem.  And you don’t want to be in macro-land for such a dumb reason.

I found one workaround, assuming you leave the =“” (or more complicated derivative) formula in place.  If you highlight the area, do a Go To Special, select Formulas and only check Text, it will highlight all the non-blank blanks (assuming all other values are either hard-coded or numbers), which you can then just press delete to clear.  That’s a very risky workaround, though.  It would be pretty easy to delete something you meant to keep in this scenario.  If you had a desirable =“HELLO” function, it goes away in this method.

I can stomach that a formula returning “” should be considered a non-blank.  I do not agree that a pasted-values “” cell should be non-blank.  That’s a bug in my view.  Maybe if you split the concept to Values-Blank and Content-Blank, where a “” cell would be Values-Blank only, and a totally cleared cell would be Content-Blank.  But that’s definitely busting core functionality and logic for a silly edge case.  It’s a pity.

The job is going very well.  I realized toward the end of Turkey that my job lacked stability on a lot of vectors.  A lot.  This job basically has stability on all vectors.  This means the job can be very challenging and busy and still not be the kind of gut-twisting strain you would see in a volatile environment.  Just being back home with very like-minded and highly qualified individuals makes everything easier.  The state of things currently is very similar to what I inherited at the refinery, maybe even in better shape.  So, it’s kind of a smooth glide into a moderated challenge.  Things are organized.

An “easy hard job” was the concept I formed up this morning.  In Turkey, even an easy job would have been hard for many reasons.