Here’s a nifty little trick I use every day while working in Excel. It’s a two part trick. Part one will be selecting all the blank cells in a range or rather reducing a selection or a range to blank cells within that range. Part two will be how to enter a value or a formula(!) into multiple cells in Excel simultaneously.
Here’s our example in Excel
Let’s say we want to write a value of 0 (zero) into all the empty Cells. Now for those of you thinking this would be far easier by using the Ctrl+H (Find and Replace) I have only this to say. The method described here is much cooler and also, there are cases where Ctrl+H does not work, but this does 🙂
Ok so let’s get to it.
Our final goal is to put a value into all blank cells, but to do this we must first select only those cells. This can be easily accomplished by selecting an entire range of data by using a Ctrl+A shortcut in Excel.
This is followed by either F5 or Ctrl+G or a Home/Find & Select/Go ToSpecial… command
Whereas the first two keyboard shortcuts (F5 or Ctrl+G) will take to the GoTo window where you have to select Special…
The Home/Find & Select/Go ToSpecial… will take you to the desired command directly.
Now this is one of the best commands in Excel. In our case we will use the Blanks option. But take a look at some other options available in this window and let your imagination go wild!
Ok so we select Blanks and we get
So our selection was reduced only to cells that are blank. This leads us to part two…
There is only one trick here and that is the following key combination Ctrl+Enter. So without clicking (!!! If you click anywhere the whole selection is lost and you are back to square one), you type a value you would like to put in all of the selected cells and press Ctrl+Enter. And that value now resides in all selected cells.
This brings us ever so close to eternal happiness in Excel 🙂