Please help me with simple IF worksheet function.

de8212

Board Regular
Joined
Apr 30, 2002
Messages
81
I have a worksheet function that looks like this IF(A1=1,"open","closed")
THe value of A1 will on ly be three things (0,1,???). So I'd like to make the formula to do this:
When A1 is 0, I want it to say "Closed"
When A1 is 1, I want it to say "Open"
When A1 is ???, I want it to just be blank (or it can also have "???", it just can't say Open or Closed.
THanks for any help.
de
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
On 2002-05-01 04:43, de8212 wrote:
I have a worksheet function that looks like this IF(A1=1,"open","closed")
THe value of A1 will on ly be three things (0,1,???). So I'd like to make the formula to do this:
When A1 is 0, I want it to say "Closed"
When A1 is 1, I want it to say "Open"
When A1 is ???, I want it to just be blank (or it can also have "???", it just can't say Open or Closed.
THanks for any help.
de

=IF(LEN(A1),IF(A1="???","???",IF(A1=1,"Open","Closed")),"")
 
Upvote 0
Try: =if(a1=1,"open",if(a1=0,"closed",""))
I presume by ??? you mean anything other than 1 or 0.
Aladin: Why is your formula so complicated, does it have some advantages I can't see?
On 2002-05-01 04:43, de8212 wrote:
I have a worksheet function that looks like this IF(A1=1,"open","closed")
THe value of A1 will on ly be three things (0,1,???). So I'd like to make the formula to do this:
When A1 is 0, I want it to say "Closed"
When A1 is 1, I want it to say "Open"
When A1 is ???, I want it to just be blank (or it can also have "???", it just can't say Open or Closed.
THanks for any help.
de
 
Upvote 0
On 2002-05-01 04:57, Wayne Duncan wrote:
Try: =if(a1=1,"open",if(a1=0,"closed",""))
I presume by ??? you mean anything other than 1 or 0.
Aladin: Why is your formula so complicated, does it have some advantages I can't see?

Wayne,

I know it looks a bit ludic. Amendable though if it covers too much.

You had to make a caveat: I presume by ??? you mean anything other than 1 or 0.

I took "???" as a possible value of A1.

Try your version when A1 is truly blank. Hard to tell whether its result is intended.

Aladin
 
Upvote 0
Thanks for the responses. I will try and see if I can get it to work.


Aladin
The data is automatically generated into the spreadsheet and it will only be a zero, a one, or ???. So ??? is definately the actual entry into the spreadsheet.
Thanks alot.

de
 
Upvote 0
When Aladin writes a formula ,
he looks very far ,and he is absolutely correct !!!
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,211
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top