Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
can I make cell yes equal 1, no equa
 
Posts: n/a
Default can I make cell "yes" equal 1, "no" equal 0


  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: can I make cell "yes" equal 1, "no" equal 0

Yes, you can make cell "yes" equal 1 and "no" equal 0 in Microsoft Excel. Here's how:
  1. Select the cell where you want to enter the formula.
  2. Type the following formula:
    Formula:
    =IF(A1="yes",1,0
  3. Press Enter.

This formula checks if the value in cell A1 is "yes". If it is, the formula returns 1. If it's not, the formula returns 0.

You can also copy this formula to other cells by dragging the fill handle (the small square at the bottom right corner of the cell) to the cells where you want to apply the formula.

Alternatively, you can use the IF function with logical operators to check for other values besides "yes" and "no". For example, if you want to check for "true" and "false", you can use the following formula:
Formula:
=IF(A1=TRUE,1,0
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

in another cell?

=IF(AND(A1<"yes",A1<"no"),"",(A1="yes")*1+(A1="n o")*0)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"can I make cell yes equal 1, no equa" <can I make cell "yes" equal 1, "no"
wrote in message
...



  #4   Report Post  
Sandy Mann
 
Posts: n/a
Default

Picky but I don't think that you need the " +(A1="no")*0 " Just

=IF(AND(A1<"yes",A1<"no"),"",(A1="yes")*1)

or

=IF(AND(A1<"yes",A1<"no"),"",--(A1="yes"))

will work

Regards

Sandy
--
to e-mail direct replace @mailintor.com with @tiscali.co.uk


"Bob Phillips" wrote in message
...
in another cell?

=IF(AND(A1<"yes",A1<"no"),"",(A1="yes")*1+(A1="n o")*0)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"can I make cell yes equal 1, no equa" <can I make cell "yes" equal 1,

"no"
wrote in message
...





  #5   Report Post  
Bob Phillips
 
Posts: n/a
Default

Hi Sandy,

Quite right, well spotted.

Bob

"Sandy Mann" wrote in message
...
Picky but I don't think that you need the " +(A1="no")*0 " Just

=IF(AND(A1<"yes",A1<"no"),"",(A1="yes")*1)

or

=IF(AND(A1<"yes",A1<"no"),"",--(A1="yes"))

will work

Regards

Sandy
--
to e-mail direct replace @mailintor.com with @tiscali.co.uk


"Bob Phillips" wrote in message
...
in another cell?

=IF(AND(A1<"yes",A1<"no"),"",(A1="yes")*1+(A1="n o")*0)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"can I make cell yes equal 1, no equa" <can I make cell "yes" equal 1,

"no"
wrote in message
...







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 cell equal to another cells value and not it's fo. TroutKing Excel Worksheet Functions 2 January 17th 05 07:15 PM
make cell contents equal to null value - not blank, but empty mpierre Excel Worksheet Functions 1 December 29th 04 07:57 AM
How do I make one cell equal to another Deb Blackshaw Excel Worksheet Functions 2 December 20th 04 01:29 AM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 03:06 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 08:16 PM


All times are GMT +1. The time now is 10:21 AM.

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"