+ Reply to Thread
Results 1 to 8 of 8

Guidance On How To Set A Cell To Y/N Based Upon Multiple Criteria In Another Worksheet

  1. #1
    Registered User
    Join Date
    11-28-2018
    Location
    USA
    MS-Off Ver
    2016
    Posts
    6

    Guidance On How To Set A Cell To Y/N Based Upon Multiple Criteria In Another Worksheet

    I have two worksheets. I'm would like to populate Column D in the All Ports sheet with Y/N based upon whether or not that swtich/port combination exists in the NAC Ports sheet. So for example, D1 - D4 would have an "N" while D24 - D26 would have a "Y" since those rows exist in the NAC Ports sheet.

    Example sheets are below.

    I'm pretty much an Excel newbie when it comes to anything beyond basic formulas. Any help along with an explanation as to how the formula works would be much appreciated!

    Thanks,

    Drew

    All Ports Sheet

    A B C D
    1 Switch Port VLAN Description NAC
    2 CL-First-Floor-Pavillion-Sw ge-0/0/0 Guest-Wired
    3 CL-First-Floor-Pavillion-Sw ge-0/0/1 Guest-Wired
    4 CL-First-Floor-Pavillion-Sw ge-0/0/2 Guest-Wired
    5 CL-First-Floor-Pavillion-Sw ge-0/0/3 Guest-Wired
    ...
    24 CL-First-Floor-Pavillion-Sw ge-0/0/11 First-Floor-Users
    25 CL-First-Floor-Pavillion-Sw ge-0/0/12 First-Floor-Users
    26 CL-First-Floor-Pavillion-Sw ge-0/0/13 First-Floor-Users

    NAC Ports Sheet

    A B
    1 Switch Port
    2 CL-First-Floor-Pavillion-Sw ge-0/0/11
    3 CL-First-Floor-Pavillion-Sw ge-0/0/12
    4 CL-First-Floor-Pavillion-Sw ge-0/0/13
    Last edited by 610Drew; 11-30-2018 at 04:11 PM.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Guidance On How To Set A Cell To Y/N Based Upon Multiple Criteria In Another Worksheet

    you could just use a countIFS

    =COUNTIFS(Sheet1!A:A,A2,Sheet1!B:B,B2)
    where sheet 1 is the name of the NAC sheet

    that will give a 0, 1 or more depending on how many matches it finds

    then we can use and IF
    =IF(COUNTIFS(Sheet1!A:A,A2,Sheet1!B:B,B2)>0, "Y","N")
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Guidance On How To Set A Cell To Y/N Based Upon Multiple Criteria In Another Worksheet

    You can use VLOOKUP or INDEX/MATCH or you could probably get away with a simple COUNTIF.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Guidance On How To Set A Cell To Y/N Based Upon Multiple Criteria In Another Worksheet

    HOW ABOUT
    =IF(COUNTIFS('nac ports'!$A$2:$A$4,A2,'nac ports'!$B$2:$B$4,B2)=1,"y","n")

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Guidance On How To Set A Cell To Y/N Based Upon Multiple Criteria In Another Worksheet

    Ah, apologies ... missed the combo requirement. So, as etaf has suggested, use COUNTIFS. You don't actually need the >0 part.

  6. #6
    Registered User
    Join Date
    11-28-2018
    Location
    USA
    MS-Off Ver
    2016
    Posts
    6

    Re: Guidance On How To Set A Cell To Y/N Based Upon Multiple Criteria In Another Worksheet

    Thank you for the replies! COUNTIFS seems to work fine.

    Cheers,

    Drew

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Guidance On How To Set A Cell To Y/N Based Upon Multiple Criteria In Another Worksheet

    Glad we could help & thanks for the feedback

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Guidance On How To Set A Cell To Y/N Based Upon Multiple Criteria In Another Worksheet

    You're welcome. Thanks for the rep.

+ 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] Merge multiple sheets data into one worksheet based on multiple criteria and date
    By hecgroups in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 02-03-2018, 04:19 AM
  2. [SOLVED] Merge multiple sheets data into one worksheet based on multiple criteria
    By hecgroups in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 01-05-2016, 10:32 AM
  3. How to copy rows based on multiple criteria from one worksheet to another ?
    By Caster in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2015, 06:27 AM
  4. splitting multiple worksheet based on column criteria
    By sachin483 in forum Excel General
    Replies: 2
    Last Post: 04-10-2015, 10:27 PM
  5. [SOLVED] Copy rows from one worksheet to another worksheet based on a cell criteria.
    By keneco in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-07-2013, 10:28 AM
  6. How to populate a second worksheet based on multiple criteria from another worksheet
    By bruce.shoemake in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-14-2012, 05:28 PM
  7. count based on multiple criteria on a second worksheet
    By MarcoDaenan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-03-2009, 11:07 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