Solved excel 2007 how to return 1 or 0 with IF

January 15, 2014 at 13:03:24
Specs: Windows 7
How do you give a "Yes" or "No" value as a 1 (0ne) for "Yes" or a 0 (Zero) for "No" in Excel 2007 to do an if statement. =IF(P3=1,N3,0)

See More: excel 2007 how to return 1 or 0 with IF

Report •

#1
January 15, 2014 at 13:24:46
✔ Best Answer
You should be able to use:

=IF(A1="Hello",1,0)

If "Hello" is a number, do not put it in quotes.


Report •

#2
January 15, 2014 at 16:09:41
or:

=IF(A1="Hello",1,)

or:

=IF(A1="Hello",TRUE,)*1

or

=(A1="Hello")*1

or

=(A1="Hello")+0

I could go on all day! ;-)

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#3
January 15, 2014 at 16:13:00
Hi rlonestar!

When posting in a help forum please try to use a subject line that is specific to the contents of your post.

If everyone used a generic subject line like "Excel 2007 how to" or "Excel Help" (something we see a lot!) then we wouldn't be able to tell one question from another and things would get very confusing around here.

I fixed the subject line for this thread, but we'd appreciate it if you could keep that in mind for future posts.

Thanks!

DerbyDad03
Office Forum Moderator

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •
Related Solutions


Ask Question