Give us a proper NULL() worksheet function.
This would make calculations and charts treat a cell containing a formula as a blank cell, not as a cell with a text string ("") or as a zero.
Great suggestion – thanks again for taking the time to put it on this site and for the thoughtful followup comments. This is pretty related to some other work we’ve got going and already has a fair number of votes, so we’ll work on getting plans in place now and hope to get started on this soon.
John [MS XL]
First260: that does not provide the functionality of using some formula to flag "interesting" rows (or columns) with others as blank, and using CTRL+arrow to skip over the blank ranges.
Ben, for reasons outlined below a 'proper NULL function' is likely to be destined to fail.
But now with dynamic arrays one can replicate some of the functionality required,
For example if you want to enter in C1:
You could instead enter this formula in B1:
Then hide column B
This ensures columns A and C will always match even where column A contains blanks
CTRL+arrow jumps to the "edge" of contiguous data-containing cell blocks. You can use this to skip large contiguous blocks of empty cells to jump to what may be relative anomalies. If a cell has a formula setting it up to contain a value if a certain condition is met, and be blank otherwise, this trick doesn't work and you have to manually scan/scroll through. A proper NULL() function should allow those blank cells to be skipped over in bulk.
Roy, I think you replied to a post that i retracted after some further investigation. It seems the bottom line is Excel team botched implementing Blank/Empty in the first place and there's really no good way out of the mess. In all versions of Excel the following all return TRUE when A1 is blank:
But the right hand sides of these equalities are not equal to each other which has the side effect that we have to handle each case separately in formulas. Does it really make sense to add a new value NULL() which is also equal to blank but yet another different value under the hood?
Note: NaN() should be equivalent to the IEEE special number NaN and can be defined as a VBA udf as:
Function NaN() As Double
On Error Resume Next
NaN = 0 / 0
but actually displays as a number. Also mathematically speaking the equals operator is non-transitive and hence not an equivalence relation due to this definition of blank.
A null value would be different than the current blank.
"Blank" being what you get if you, for example:
1) Enter ="" in A1, the copy and paste values back on it, or to some different cell
2) Have a formula in A1 that returns "" as its result.
3) Have some value in A1, then select it and hit Delete or Clear Contents
and some other things.
Anyway, Excel is currently able to distinguish between a cell that has a history but is currently blank in the English language sense of blank: literally nothing entered in the cell, and those cells which have never, ever, had a value in them. So it should currently have no issues distinguishing, in program, between types of "blank" or "empty" it encounters.
Alright, you have A1 which has never had an entry, ever. Presently, "=A1" would return a 0 in whatever cell or formula it is in. "=ISBLANK(A1)" would return TRUE. Put "=F10" into A1 and now A1 would return 0, =A1 would return 0, but ISBLANK(A1) would return FALSE (after all, there's a formula there now). References to any of these cells would produce currently expectable results.
Now delete the entry in A1 and you're back to the original. However, Excel can still see that though it is blank, it has been used and will act accordingly, saving information for it and doing things like sorting it into a different place than it would if it had never been used. (Ever delete the last 10,000 rows of a data set and find Ctrl-End still sends you to the last cell in them? That is Excel still realizing they've been used. Just blank, not empty.)
Now close all that and open a new spreadsheet, then put the formula I mentioned in B1 (assuming a NULL() function now exists). Excel would return a truly empty cell result in B1, not a zero. That result would be precisely what is thinks about A1 itself since we have never entered anything there and it's really empty. So =A1=B1 would return TRUE as the value of the never used A1 and the NULL() function's result of a true null is the very same thing. If you enter =B1 in D1, D1's result would be a true null (as in "empty, never used") as well. So "empty" from your choice of that or zero.
Notice the effect of the formula was to pass onward a null value for B1 even though it has a formula in it. Of course, there are functions in Excel, like FORMULATEXT(), that need to return the underlying material, but they already are programmed to ignore the result and evaluate the underlying material. A Table would also have to look at it this way, else one might have odd effects if a formula in the first cell of a row looked utterly unused to the Table. Or maybe not. But whacky things like that could crop up with issues. Don't mind a wait while things like that are gotten right. DO mind a wait if it's just "you're only 671 people out of our 800,000,000 person user base so..."
Well, first off, the current situation has sucked for 30 years. I'm completely willing to spend the next wrapping "=A1" to get "=IF(ISBLANK(A1),NULL(),A1) and have a result that Excel treats as it does never used cells. NOT A PROBLEM dude.
Second, Most of us asking for this almost certainly do NOT have any misunderstanding about the return and therefore how we'd have to use it.
Third, part and parcel of any real solution would be for MS to treat any blank as it treats never used cells. Presumably, it stores only a cell address and value (in a simplified version of things) and would simply have to not store such if blank. "Blank" = empty: either never used, or contents deleted or cleared. "0" would need to be treated as an actual value, not all the absences of a value as well as an actual entry of "0". Since what's stored likely includes more information than I imagine, things used internally, not just formatting and values and such, the simple version is unlikely and Excel would have to make provision for a value of NULL and handle it however works best for them. Then deleting/clearing contents would set that value, not just leave no value at all.
But fourth, we'll all of us be pretty happy if they just work out the FUNCTION asked for rather than a fuller solution. Nice if they did the whole enchilada but if we could just have the function and Excel acted properly (or at least "as expected") on its use, we'd be really happy.
"Properly" ("as expected") would mean things like sort a set of data and NULLs appear at the bottom of the sort result just like never used cells would rather than as a separate grouping, above those.
Also, considering sorting, it is clear Excel can already distinguish between current NULLs (never used cells) and blanks, but also it can clearly already distinguish between 0's and blanks as well. So since it can already distinguish all three "values" and so MIGHT be able to already do the underlying work the function would need.
No one's even asking for perfection, just better, by this much.
While this would be nice in theory I think a lot of people have missed the fundamental problem that the formula =A1 returns zero if A1 is blank which means there is no consistent / backward compatible way to have a formula return a blank or null.
Google sheets on the other hand will return empty in this case which opens up that option.
In effect you'd need one return for null and another for blank/empty which would just add more confusion if it displayed as empty as well.
I want a proper NULL() so that if I have a formula in cell B2, text from A2 will spill into B2 instead of being cut off. I need this for a technique where sheet A does calculations and Sheet B refers to Sheet A with formatting and conditional display of data, but blank cells don't behave properly, hence the need for NULL()
B B commented
An application I have for programmed "NULL" is plotting. When there is nothing to be plotted from a cell, I don't want the plot to show a zero value. I just want NOTHING plotted. I am hoping by use of a simple IF phrase I can enter the to-be-created "NULL" and that the plot routine will according not attempt to show ANYTHING for affected cells ( as if they'd not been selected ). Here's wishing.
The lack of this function is giving me a headache. I am pasting the output of an excel where formula fills cell as blank with "" in a new excel with the value only option, but now my formula in this new sheet doesnt see it as a true blank which causes my formula to give a false positive (i am checking if the cel is not empty to check if this cell contains a number higher the 999 which now returns true on this "empty" cell. No waty to work around this.
V C commented
Just want to add yet another comment to this to make sure this is still marked as a function that needs creating!
Please, Microsoft people, sort out this mess. Fancy functions are all very well but this is an important basic function and its absence makes life really problematic in the real word - the part outside of Microsoftworld where this sort of problem clearly does not arise. Please define clearly the terms Blank, Empty and Null and provide a "NULL()" function.
Amir Melamed commented
Its true, see attached file.
it contains cells with "" that are NOT EMPTY.
Please provide a way to CLEAR these cells.
see attached file
Hey guys, take heart. Even though they've had 3½ years to have a change of their own hearts, they still consider it PLANNED... no downgrade!
What's the gift type for four year anniversaries again?
There is an issue inherent in Excel, where the line is blurred between the definitions of the words EMPTY, BLANK, and NULL. So as to be clear in this matter, I will make the words BLANK and NULL synonymous, both meaning TRULY BLANK, and EMPTY will mean empty string, such as ""
We all know that an empty string, being "", is NOT equivalent to a TRUE BLANK OR NULL CELL as per the ISBLANK() function. When a formula in lets say cell E3 returns an empty string as a value, based on a condition, for example in an IF() function, then, when cell E3 is Copied and then Pasted_Special_Values_Only into lets say cell E7, then cell E7 will NOT be truly blank, and Excel will consider cell E7 as containing a value, which in this case is an empty string. However, there is still confusion within Excel programming, since the COUNTBLANK() function does count empty strings "" as a blank cell, it is therefore counting TRUE BLANK CELLS AND an empty strings as blank in its count.
In other words, Excel treats a cell containing an empty string as blank in the COUNTBLANK() function, but does not treat it as a TRUE blank cell for everything else. Like when browsing through scattered visible values in the column of a long list using CTRL-DOWN/UP ARROW KEYS. When doing that, it will ignore the cells in that column containing actual visible text, we will call them visibly valued cells, as it will simply go strait from top row to bottom row when toggling between CTRL-UP and DOWN. If the cells in that column found between visibly valued cells were actually TRULY blank, then toggling between CTRL-UP and DOWN would go to previous visibly valued cell and then to the next and back and forth so on, as per designed.
Now, by design, is it intended for Excel to treat empty strings as different than truly blank cells? I think it is, and it should treat empty strings as different than truly blank cells, but that also means that they should either change the name of the COUNTBLANK() function to either something like COUNTBLANKANDEMPTY(), or dichotomise the function into two separate functions, something like COUNTBLANK() for TRULY BLANK cells, and COUNTEMPTY() for cells containing empty string as value. Or even better, have all three functions available, so COUNTBLANK() for truly blank cells, COUNTEMPTY() for empty string cells, AND COUNTBLANKANDEMPTY() for counting both types of cells.
Are there any workarounds for this? Answer is YES, and I shall provide examples.
E2=IF(C2=2, "Cell C2 equals 2", "NULL")
Now if you use that kind of formula dynamically in a column to downfill a long list, like nested within a VLOOKUP() formula for instance, then you will see that column filled with the actual word NULL as text value mixed in with some scattered true data values. This way, it will be easy to convert the cells containing the word NULL as text by applying a FILTER to that column, selecting to view only the cells containing the word NULL as text, and then easily selecting all the cells containing the word NULL as text, and then hitting the DELETE key, rendering them TRULY BLANK. I use the word NULL as a personal preference, but one can just use any word they want, like TOEMPTY or whatever.
Is a NULL() or TRUEBLANK() function truly necessary? I say it couldn’t hurt to have it, BUT, the REAL issue is within the PASTE_SPECIAL_VALUES_ONLY functionality. A checkbox option named like “Copy empty string values as blank cells” should be added. There is a Skip blank option, but that does not work.
Russell Richter commented
I have a formula that evaluates to TRUE/FALSE/null in Excel. That Excel file is linked to Power BI. Power BI reads that field as Boolean, and converts all the nulls to FALSE, which is not correct. Nulls in a Boolean field are neither TRUE nor FALSE. So, the more we feed other systems with Excel files, the more we need a NULL value.
Jaime Segura commented
Have you noticed that COUNTBLANK and ISBLANK react different with cells containing ="" ?
Ed Hansberry commented
PowerApps has a BLANK() function as well. It would seem to make sense to add this to Excel for consistency, and perhaps a NULL() in both, though in PowerApps, it treats null and blank as the same.
Yep, can an Admin merge this suggestion with https://excel.uservoice.com/forums/304921-excel-for-windows-desktop-application/suggestions/17265644-null-worksheet-function ? Please
Chibi Beru commented
Please merge this request with the "NULL worksheet function" one. This would raise its votes number