ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Represent blanks in an Excel IF statement? (https://www.excelbanter.com/excel-discussion-misc-queries/85075-represent-blanks-excel-if-statement.html)

JG

Represent blanks in an Excel IF statement?
 
How do you represent blanks in an Excel IF statement? I tried =if(K2="
",1,0) but the " " did not work. Thank you for your time and assistance in
advance.

Roger Govier

Represent blanks in an Excel IF statement?
 
Hi

You shouldn't include any spaces between the sets of double quotes
=IF(K2="",1,0)

Including a space is telling Excel to compare whether there is a space
in the cell, not a null value.

--
Regards

Roger Govier


"JG" wrote in message
...
How do you represent blanks in an Excel IF statement? I tried
=if(K2="
",1,0) but the " " did not work. Thank you for your time and
assistance in
advance.




Sheila D

Represent blanks in an Excel IF statement?
 
It looks like you have a space between the speech marks which means that it
will be looking for a space, try it as "" - just the speech marks.
HTH Sheila

"JG" wrote:

How do you represent blanks in an Excel IF statement? I tried =if(K2="
",1,0) but the " " did not work. Thank you for your time and assistance in
advance.


Gary''s Student

Represent blanks in an Excel IF statement?
 
Almost the

No space between the pair of double quotes.
--
Gary's Student


"JG" wrote:

How do you represent blanks in an Excel IF statement? I tried =if(K2="
",1,0) but the " " did not work. Thank you for your time and assistance in
advance.



All times are GMT +1. The time now is 03:01 PM.

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