# IF Target Cell = Yes then 1, if No = 0 how do I set this up

1. ## IF Target Cell = Yes then 1, if No = 0 how do I set this up

I have a spreadsheet with YEs/No in Column A, and I need to output either a 1 or 0 in Column B. I know this is probably and easy solution but I just can't think of it for the life of my. I'm having a brainfart right now   Register To Reply

2. ## Re: IF Target Cell = Yes then 1, if No = 0 how do I set this up

Put this in B1:

=--(A1="Yes")

then copy down.

Hope this helps.

Pete  Register To Reply

3. ## Re: IF Target Cell = Yes then 1, if No = 0 how do I set this up

Currently trying to use a formula similar to =IF(D6=Yes,1,0) but its returning me a name error, Could it be because the cell I'm referencing Is getting it's data for a vlookup function or am I just messing something up?  Register To Reply

4. ## Re: IF Target Cell = Yes then 1, if No = 0 how do I set this up

Nevermind that works perfectly! thanks I was missing the " around the Yes lol  Register To Reply

5. ## Re: IF Target Cell = Yes then 1, if No = 0 how do I set this up

You would need to put quotes around the Yes in that formula:

=IF(D6="Yes",1,0)

That cell reference is a bit different to what you described in Post #1

Hope this helps.

Pete  Register To Reply