![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Posts: 62
|
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 |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
|
|
|
|
|
|
|
#3 | |
|
Board Regular
Join Date: Apr 2002
Location: Toronto
Posts: 73
|
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? Quote:
|
|
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
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 |
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Apr 2002
Posts: 62
|
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 |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Apr 2002
Posts: 62
|
Worked great. Thank you for the help.
de |
|
|
|
|
|
#7 |
|
Board Regular
Join Date: Mar 2002
Location: Hellas
Posts: 553
|
When Aladin writes a formula ,
he looks very far ,and he is absolutely correct !!! |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|