+ Reply to Thread
Results 1 to 7 of 7

Insert Y/N value next to name if same value is present in a table from another sheet

  1. #1
    Registered User
    Join Date
    07-13-2016
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    5

    Insert Y/N value next to name if same value is present in a table from another sheet

    Sheet1 contains a table with two columns: Names, Y/N. Names contains a list of all the possible people who may have completed a survey. Y/N should indicate whether or not they have completed the survey.

    Sheet2 contains only one column of values: Completed. Completed is a list generated with names of everyone who has actually completed the survey.

    I require a function/formula that will place a "Y" next to the names of those that have completed the survey (names that appear on Sheet2), and a "N" next to the values that do not appear on sheet2.

    Basically, Sheet1 should return Y/N values as such:

    Name Y/N
    Jack Y
    Jim N
    Jeff Y
    James Y



    If Sheet2 looks like this:

    Completed:
    James
    Jack
    Jeff


    Is this possible? Any help is appreciated! Also if there is another way to do this, it would be great to know! Basically I receive a list of people that have completed the survey, and there are about 150 people who are required to take it. The table should represent which people have taken the survey, and which have not.

    Thanks

  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,794

    Re: Insert Y/N value next to name if same value is present in a table from another sheet

    You can put this in B2 of Sheet1:

    =IF(COUNTIF(Sheet2!A:A,A2)>0,"Y","N")

    then copy down.

    Hope this helps.

    Pete
    Last edited by Pete_UK; 07-13-2016 at 06:43 PM. Reason: changed A1 to A2 in formula

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Insert Y/N value next to name if same value is present in a table from another sheet

    Try this in B1 of Sheet 1 and copied down:

    =IF(COUNTIF(Sheet2!A:A,A1)=1,"Y","N")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Insert Y/N value next to name if same value is present in a table from another sheet

    One way...

    Sheet2 data in column A.

    Sheet1
    A
    B
    1
    Name
    Y/N
    2
    Jack
    Y
    3
    Jim
    N
    4
    Jeff
    Y
    5
    James
    Y
    6
    ------
    ------


    This formula entered in B2 and copied down:

    =IF(COUNTIF(Sheet2!A:A,A2),"Y","N")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    07-13-2016
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    5

    Re: Insert Y/N value next to name if same value is present in a table from another sheet

    Thanks everyone, works great!

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Insert Y/N value next to name if same value is present in a table from another sheet

    You're welcome!

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Insert Y/N value next to name if same value is present in a table from another sheet

    You're welcome. Thanks for the feedback!

+ 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. [SOLVED] Insert rows copied from one sheet into a table on another.
    By apostrophe27 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2016, 02:07 PM
  2. Copy a table from SAP and insert it into active excel sheet
    By DavidBor. in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-24-2015, 10:29 AM
  3. Insert Row on a table in a protected sheet.
    By siroos12 in forum Excel General
    Replies: 2
    Last Post: 07-08-2015, 09:14 AM
  4. Replies: 2
    Last Post: 09-03-2014, 03:37 AM
  5. Keep format of data table after insert a new row on a protected sheet
    By RickyC in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-07-2010, 10:58 AM
  6. Copy Sheet & Create New Monthly Sheet From Present Sheet
    By unley in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-16-2010, 12:00 PM
  7. insert rows only if data is present
    By jbenton in forum Excel General
    Replies: 0
    Last Post: 11-08-2007, 12:43 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