+ Reply to Thread
Results 1 to 3 of 3

Check to see numbers are present in ranges

  1. #1
    Registered User
    Join Date
    06-10-2015
    Location
    nyc
    MS-Off Ver
    2011
    Posts
    1

    Question Check to see numbers are present in ranges

    In sheet 1, I have a list of ranges as follows, with a true false value associated to the range in excel.

    1000 |2000 | False
    2001 | 9001 | True
    9002 | 13121 | False

    ....

    In separate sheet 2, I have a list of numbers below as follows

    9003
    9900
    1500
    2200

    Basically I want to check to see if the numbers in sheet 2 is in one of the ranges in sheet 2, and indicate the corresponding False / True Value.

    i.e. it would result in this:

    9003 | False
    9900 | False
    1500 | False
    2200 | True

    I was wondering the best way to do this?

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

    Re: Check to see numbers are present in ranges

    Hi Mark,
    Welcome to the forum.

    See if the following code works for you.
    Please Login or Register  to view this content.
    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.

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Check to see numbers are present in ranges

    Try the formula =VLOOKUP(A1, Sheet1!$A$1:$C$100, 3)
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ 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. vba to check if picture is present?
    By thecdnmole in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-08-2014, 05:09 AM
  2. Replies: 2
    Last Post: 09-03-2014, 03:37 AM
  3. Present check
    By jakeembx in forum Excel General
    Replies: 2
    Last Post: 11-13-2013, 06:32 AM
  4. How to check if a number is present in a range of cells?
    By neelabh_krishna in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-06-2012, 12:46 AM
  5. check if legend is present in active chart in vba
    By leg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-27-2007, 07:14 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