+ Reply to Thread
Results 1 to 6 of 6

Check for a value in a large table and return 'Y' or 'N'

  1. #1
    Registered User
    Join Date
    11-21-2012
    Location
    Blackpool, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Smile Check for a value in a large table and return 'Y' or 'N'

    Hello
    I'm having difficulty in working out a solution to my problem, I have tried using Match or Index but they seem to refer to single columns or rows. The problem is that I have a large table of four digit numbers in each cell, this table could be 100 columns wide by 50 rows, that doesn't really matter. I also have a separate table with one column of four digit numbers. I want to look at the single column of numbers for the value and see if it exists anywhere in the large table, I don't need to count it or anything else other than check to see if it exists, if it does then 'Y', if not then 'N'. Example image attached but I'm afraid I have no formulae as anything I try doesn't work.
    Thanks in anticipation.

    excelimage.jpg

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Check for a value in a large table and return 'Y' or 'N'

    Use countif
    for example, data is in A1:Z100, then in AA1 you have the value to search for, in AA2:
    =if(countif(A1:Z100,"="&AA1)>0,"Y","N")

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Check for a value in a large table and return 'Y' or 'N'

    you could use
    =COUNTIF(your range, your criteria )

    so

    IF( COUNTIF(your range, your criteria )=1, "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.

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

    Re: Check for a value in a large table and return 'Y' or 'N'

    I moved the numbers from A5:A10 to G1:G6, and then used this formula in H1:

    =IF(COUNTIF(A:D,G1)>0,"Y","N")

    which can then be copied down. If you have 50 columns of data, you will need something like this:

    =IF(COUNTIF(A:AX,AZ1)>0,"Y","N")

    with the numbers that you are looking for in column AZ, and the formula in BA1.

    Hope this helps.

    Pete

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Check for a value in a large table and return 'Y' or 'N'

    You can use countif as replied by every member above in their replies. See the attached sheet.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  6. #6
    Registered User
    Join Date
    11-21-2012
    Location
    Blackpool, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Check for a value in a large table and return 'Y' or 'N'

    Thank you to all of you, I couldn't see the wood for the trees.

+ 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. Return a reference from LARGE function
    By marcusmpe in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-15-2017, 03:28 AM
  2. Replies: 9
    Last Post: 10-01-2013, 04:37 AM
  3. Replies: 8
    Last Post: 12-09-2012, 10:30 PM
  4. Displaying large table into smaller table
    By FlynHokie in forum Excel General
    Replies: 3
    Last Post: 12-08-2012, 10:49 AM
  5. check if reference exists, then return its value or return 0
    By doudou in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-06-2005, 03:05 AM

Tags for this Thread

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