ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If function - Add if its blank, to return blank (https://www.excelbanter.com/excel-worksheet-functions/186819-if-function-add-if-its-blank-return-blank.html)

Natalie

If function - Add if its blank, to return blank
 
Hi,

I have put an If Function on the below formula, but I only want it to appear
if the cell has an entry in it. For example

CellA CellB
Yes =IF(A1="YES","NO","YES")

The above works, but it also puts in "Yes" if Cell A is blank, and I want to
be blank if CellA is blank.

Thanks in advance for any help provided!

Rick Rothstein \(MVP - VB\)[_411_]

If function - Add if its blank, to return blank
 
This should take care of the blank problem...

=IF(A1="","",IF(A1="YES","NO","YES"))

However, it is unclear if you want "YES" as the result if anything other
than "NO" is entered in A1 (right now, that is what happens). If you want
this as a pure Yes/No toggle and blank for anything else...

=IF(A1="","",IF(A1="YES","NO",IF(A1="NO","YES","") ))

Rick


"Natalie" wrote in message
...
Hi,

I have put an If Function on the below formula, but I only want it to
appear
if the cell has an entry in it. For example

CellA CellB
Yes =IF(A1="YES","NO","YES")

The above works, but it also puts in "Yes" if Cell A is blank, and I want
to
be blank if CellA is blank.

Thanks in advance for any help provided!




All times are GMT +1. The time now is 08:02 AM.

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