Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1
Default How do I make 1 = "yes"?

I have looked all over and have to finish this report asap. Help is not
helping. How do I format a cell to return a word when I input a number? For
example, "2" = "Not enough info" or "0" = "No"?
Thanks -
Excel newbie
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: How do I make 1 = "yes"?

How to use the IF function in Excel
  1. Select the cell where you want the result to appear.
  2. Type the following formula into the formula bar:
    Code:
    =IF(A1=1,"Yes","No")
  3. Replace "A1" with the cell reference where you will input the number.
  4. Replace "Yes" and "No" with the words you want to appear if the condition is true or false, respectively.

To return different words for different numbers, you can use nested IF functions. For example, you could use the formula
Code:
=IF(A1=2,"Not enough info",IF(A1=0,"No",""))
to return "Not enough info" if the input is 2, "No" if it's 0, and leave the cell blank if it's any other number.

If you need to perform more complex calculations or automate tasks in Excel, you can use macros or Visual Basic code. To write a macro, press Alt+F11 to open the Visual Basic Editor, then click Insert Module and enter your code between the
Formula:
Sub 
and
Formula:
End Sub 
statements.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3,440
Default How do I make 1 = "yes"?

There is this ancient Format feature where you can specify up to 3 conditions plus an Else branch.

FormatCellsNumber tab, Custom. In the Type box, enter something like

[=1]"yes";[=2]"Not enough info";"no"

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


"lindasuenwh" wrote in message ...
|I have looked all over and have to finish this report asap. Help is not
| helping. How do I format a cell to return a word when I input a number? For
| example, "2" = "Not enough info" or "0" = "No"?
| Thanks -
| Excel newbie


  #4   Report Post  
Posted to microsoft.public.excel.newusers
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default How do I make 1 = "yes"?

That's very cool Nick, and certainly a keeper. It does exactly what the OP
asks for, however, it will also return a "no" for any other number besides 0,
1, or2 in my XL97. Is there a way to change it to allow the other numbers to
show as typed?

Vaya con Dios,
Chuck, CABGx3



"Niek Otten" wrote:

There is this ancient Format feature where you can specify up to 3 conditions plus an Else branch.

FormatCellsNumber tab, Custom. In the Type box, enter something like

[=1]"yes";[=2]"Not enough info";"no"

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


"lindasuenwh" wrote in message ...
|I have looked all over and have to finish this report asap. Help is not
| helping. How do I format a cell to return a word when I input a number? For
| example, "2" = "Not enough info" or "0" = "No"?
| Thanks -
| Excel newbie



  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3,440
Default How do I make 1 = "yes"?

Hi Chuck,

Not that I know of, at least not with 3 other conditions.
Normally the format code is divided into three zones: one each for positive, negative, zero, text.
But if you use it for self-defined conditions, I have not found a way to have 3 conditions and an ELSE branch.

Maybe someone else?

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"CLR" wrote in message ...
| That's very cool Nick, and certainly a keeper. It does exactly what the OP
| asks for, however, it will also return a "no" for any other number besides 0,
| 1, or2 in my XL97. Is there a way to change it to allow the other numbers to
| show as typed?
|
| Vaya con Dios,
| Chuck, CABGx3
|
|
|
| "Niek Otten" wrote:
|
| There is this ancient Format feature where you can specify up to 3 conditions plus an Else branch.
|
| FormatCellsNumber tab, Custom. In the Type box, enter something like
|
| [=1]"yes";[=2]"Not enough info";"no"
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
|
| "lindasuenwh" wrote in message
...
| |I have looked all over and have to finish this report asap. Help is not
| | helping. How do I format a cell to return a word when I input a number? For
| | example, "2" = "Not enough info" or "0" = "No"?
| | Thanks -
| | Excel newbie
|
|
|




  #6   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3,440
Default How do I make 1 = "yes"?

<into three zones

Four, of course
Sorry about that

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Niek Otten" wrote in message ...
| Hi Chuck,
|
| Not that I know of, at least not with 3 other conditions.
| Normally the format code is divided into three zones: one each for positive, negative, zero, text.
| But if you use it for self-defined conditions, I have not found a way to have 3 conditions and an ELSE branch.
|
| Maybe someone else?
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
| "CLR" wrote in message ...
|| That's very cool Nick, and certainly a keeper. It does exactly what the OP
|| asks for, however, it will also return a "no" for any other number besides 0,
|| 1, or2 in my XL97. Is there a way to change it to allow the other numbers to
|| show as typed?
||
|| Vaya con Dios,
|| Chuck, CABGx3
||
||
||
|| "Niek Otten" wrote:
||
|| There is this ancient Format feature where you can specify up to 3 conditions plus an Else branch.
||
|| FormatCellsNumber tab, Custom. In the Type box, enter something like
||
|| [=1]"yes";[=2]"Not enough info";"no"
||
|| --
|| Kind regards,
||
|| Niek Otten
|| Microsoft MVP - Excel
||
||
|| "lindasuenwh" wrote in message
| ...
|| |I have looked all over and have to finish this report asap. Help is not
|| | helping. How do I format a cell to return a word when I input a number? For
|| | example, "2" = "Not enough info" or "0" = "No"?
|| | Thanks -
|| | Excel newbie
||
||
||
|
|


  #7   Report Post  
Posted to microsoft.public.excel.newusers
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default How do I make 1 = "yes"?

Thanks for the comeback Nick......I couldn't figure out how to do it and
thought it was just me..........I'm struggling now trying to do it with code,
but not having much luck at that either.....

Vaya con Dios,
Chuck, CABGx3



"Niek Otten" wrote:

Hi Chuck,

Not that I know of, at least not with 3 other conditions.
Normally the format code is divided into three zones: one each for positive, negative, zero, text.
But if you use it for self-defined conditions, I have not found a way to have 3 conditions and an ELSE branch.

Maybe someone else?

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"CLR" wrote in message ...
| That's very cool Nick, and certainly a keeper. It does exactly what the OP
| asks for, however, it will also return a "no" for any other number besides 0,
| 1, or2 in my XL97. Is there a way to change it to allow the other numbers to
| show as typed?
|
| Vaya con Dios,
| Chuck, CABGx3
|
|
|
| "Niek Otten" wrote:
|
| There is this ancient Format feature where you can specify up to 3 conditions plus an Else branch.
|
| FormatCellsNumber tab, Custom. In the Type box, enter something like
|
| [=1]"yes";[=2]"Not enough info";"no"
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
|
| "lindasuenwh" wrote in message
...
| |I have looked all over and have to finish this report asap. Help is not
| | helping. How do I format a cell to return a word when I input a number? For
| | example, "2" = "Not enough info" or "0" = "No"?
| | Thanks -
| | Excel newbie
|
|
|



  #8   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 207
Default How do I make 1 = "yes"?

Lindasuenwh,
Try this:
your resonse in cell C5, the formula in D5.
Answer
1 "IF($C$5=1,"YES",IF($C$5=2,"Not enogh info","NO"))

In the above example:
1 = YES, 2 = Not enough info, any other answer=NO
hth
Good luck :-)
"lindasuenwh" wrote:

I have looked all over and have to finish this report asap. Help is not
helping. How do I format a cell to return a word when I input a number? For
example, "2" = "Not enough info" or "0" = "No"?
Thanks -
Excel newbie

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make a 3-dimensional plot in Excel? John W. Mordosky Charts and Charting in Excel 6 April 3rd 23 06:58 PM
Make rulers available in excel! MikeLinPA Excel Discussion (Misc queries) 2 December 28th 05 11:18 PM
Can I make formulas more flexible? George Excel Discussion (Misc queries) 3 November 8th 05 06:38 PM
make hidden window or workbook visible without specify the name mango Excel Worksheet Functions 1 December 30th 04 04:05 PM
make cell contents equal to null value - not blank, but empty mpierre Excel Worksheet Functions 1 December 29th 04 07:57 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"