ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I set a result of an "if" function to NULL; not 0 or ""? (https://www.excelbanter.com/excel-worksheet-functions/26316-how-do-i-set-result-%22if%22-function-null%3B-not-0-%22%22.html)

mbrockhaus

How do I set a result of an "if" function to NULL; not 0 or ""?
 
I'm using an "if" statement and I want to set the TRUE condition results to
NULL rather than "0" or "". Is there a way to do this?

Don Guillett

Do you mean
=if(a1=2,"",4)

--
Don Guillett
SalesAid Software

"mbrockhaus" wrote in message
...
I'm using an "if" statement and I want to set the TRUE condition results

to
NULL rather than "0" or "". Is there a way to do this?




bj

What do you mean by "NULL"?
and why don't you want ""?

"mbrockhaus" wrote:

I'm using an "if" statement and I want to set the TRUE condition results to
NULL rather than "0" or "". Is there a way to do this?


mbrockhaus

Did that. I need to concatentate the results and so, if something "failed"
the if check, I need the results to be NULL (or blank), without Excel
thinking something is really in the cell (like a space; even "" seems to not
be the same thing). I think I really need a WHEN function more than an IF.

"Don Guillett" wrote:

Do you mean
=if(a1=2,"",4)

--
Don Guillett
SalesAid Software

"mbrockhaus" wrote in message
...
I'm using an "if" statement and I want to set the TRUE condition results

to
NULL rather than "0" or "". Is there a way to do this?





mbrockhaus

I need to concatentate the results and so, if something "failed" the if
check, I need the results to be NULL (or blank), without Excel thinking
something is really in the cell (like a space; even "" seems to not be the
same thing). Probably need something like a WHEN more than an IF.

"bj" wrote:

What do you mean by "NULL"?
and why don't you want ""?

"mbrockhaus" wrote:

I'm using an "if" statement and I want to set the TRUE condition results to
NULL rather than "0" or "". Is there a way to do this?


bj

You will need to have a macro to do this.
You cannot have a Blank in a cell as the result of an equation in that cell.
the macro which would be needed, depends on how the data is organized.

there are ways to get around the concatination of blank cells depending on
what you want to do.

"mbrockhaus" wrote:

I need to concatentate the results and so, if something "failed" the if
check, I need the results to be NULL (or blank), without Excel thinking
something is really in the cell (like a space; even "" seems to not be the
same thing). Probably need something like a WHEN more than an IF.

"bj" wrote:

What do you mean by "NULL"?
and why don't you want ""?

"mbrockhaus" wrote:

I'm using an "if" statement and I want to set the TRUE condition results to
NULL rather than "0" or "". Is there a way to do this?



All times are GMT +1. The time now is 12:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com