View Single Post
  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default

Just this portion:

=IF( CODE(A1) = 89, 1, 0)


Maybe:

=IF(CODE(A1) = code("Y"), 1, 0)
or to avoid an error if A1 is empty:
=IF(CODE(A1&" ") = code("Y"), 1, 0)

Just a little easier to read (for me anyway).

And one more way:

=if(EXACT(A1,"Y")=True,1,0)
or
=--EXACT(A1,"Y")



Earl Kiosterud wrote:

BillyBob,

If the cell contains a Y, it contains a Y. You'd use an IF in a formula
elsewhere that want's to know, like:

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

That one isn't case-sensitive. For upper-case Y only, use:

=IF( CODE(A1) = 89, 1, 0)
--
Earl Kiosterud
www.smokeylake.com

"billybob" wrote in
message ...

I need to format a cell so that if I enter an upper case "Y" it displays
the "Y" but the cell thinks the value of the "Y" is "1" so that it can
be added in another function elsewhere. I have tried to use the "IF"
functions but have had no success as of yet. HELP!


--
billybob
------------------------------------------------------------------------
billybob's Profile:
http://www.excelforum.com/member.php...o&userid=26610
View this thread: http://www.excelforum.com/showthread...hreadid=398817


--

Dave Peterson