Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sheets: how to return NULL value in IF formula that looks up date value

I'm pretty sure this is a simple formula. I'm in Google Sheets and I want to find the latest date for a value in one sheet based on the value found in another sheet, or return a null value (blank) if there i no match. Here's what I have now:

=arrayformula(Max(IF(B285='2014 Donations Log'!F:F,'2014 Donations Log'!A:A)))

BUT. I want the cell to be BLANK if there is no corresponding value in 2014 Donations Log. If I add anything to the IF test, (such as ,"") then it returns a bogus date value that is misleading.

The column is formatted for date.

I need this as a formula.

Any ideas?

like image 284
dmjaeger Avatar asked Jun 11 '14 20:06

dmjaeger


People also ask

How do I find the null value in Google Sheets?

First, select the entire data range. Then in the Ribbon, go to Home > Find & Select > Go To Special. 2. In Go To Special dialog window click on Blanks and when done press OK.


1 Answers

The solution to this is to refer to some known null column. You can even define that as a name range with a name NULL and then you can refer to NULL in your formulas. Alternative trick that may be applicable is that if your IF formula happens to be checking ISBLANK of some field and you e.g. want to only do something if some other field has a value.. well then you obviously have a guaranteed to be NULL field conveniently at your hands whenever it is "blank".

like image 186
Timo Avatar answered Oct 10 '22 08:10

Timo