ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Words equal numbers (https://www.excelbanter.com/excel-discussion-misc-queries/189246-words-equal-numbers.html)

jaywizz

Words equal numbers
 
I have a stats sheet on a workbook and I would like to be able to get it to
read a "Yes" as a 1 and a "No" as a 0

Thanks for your help

Mike H

Words equal numbers
 
Hi,

You don't say how you get YES or NO but this formula looks at A1 and if the
result of a formula in that cell is YES or No or there is a text Yes or No
then this returns 1 or 0

=IF(A1="Yes",1,IF(A1="No",0,""))

Mike

"jaywizz" wrote:

I have a stats sheet on a workbook and I would like to be able to get it to
read a "Yes" as a 1 and a "No" as a 0

Thanks for your help


David Biddulph[_2_]

Words equal numbers
 
=IF(A2="Yes",1,IF(A2="No",0,"undefined"))
If it will always be one or the other, you might use =--(A2="Yes")
--
David Biddulph

"jaywizz" wrote in message
...
I have a stats sheet on a workbook and I would like to be able to get it to
read a "Yes" as a 1 and a "No" as a 0

Thanks for your help




Roger Govier[_3_]

Words equal numbers
 
Hi

Mike has given you a method of carrying out the conversion.

If you are wanting to do this just so you can count the number of Yes
values, you don't need to convert to numbers first
=COUNTIF(A:A,"Yes") will count the number of Yes values in column A.
Substitute "No" for the alternative result.

--
Regards
Roger Govier

"jaywizz" wrote in message
...
I have a stats sheet on a workbook and I would like to be able to get it
to
read a "Yes" as a 1 and a "No" as a 0

Thanks for your help




All times are GMT +1. The time now is 07:13 PM.

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