+ Reply to Thread
Results 1 to 5 of 5

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

  1. #1
    Registered User
    Join Date
    08-13-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2010
    Posts
    66

    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
    The Truth shall set you free

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,718

    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

  3. #3
    Registered User
    Join Date
    08-13-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2010
    Posts
    66

    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?

  4. #4
    Registered User
    Join Date
    08-13-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2010
    Posts
    66

    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

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,718

    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 01-22-2013, 11:38 AM
  2. [SOLVED] Worksheet_Change(ByVal Target As Range) - set to only update when 3 target cells changed?
    By trillium in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-07-2012, 06:40 PM
  3. [SOLVED] Need alternate syntax 'Select Case' on Target.Column and Target.Row at the same time.
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-18-2012, 11:19 AM
  4. Worksheet_CHange (ByVal Target as Range) when target is formula cell
    By coasterman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2012, 07:00 PM
  5. Replies: 1
    Last Post: 07-29-2010, 12:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1