+ Reply to Thread
Results 1 to 2 of 2

Searching for a number in the range (TABLE)

  1. #1
    Registered User
    Join Date
    12-11-2018
    Location
    Poland
    MS-Off Ver
    2016
    Posts
    1

    Searching for a number in the range (TABLE)

    Hello,
    I hope someone could help to make macro in VBA or code in R.

    To better understand what I would like to do in Excel, please imagine that those table are in excel Sheets (Tables below):
    There is 3 Sheets:
    1. People
    2. Data
    3. Result
    In Sheet “People” I have name of people and number in Row 1. In “Data” sheet we can see records for those people. As you can see one man can have many records with numbers “FROM” “TO”. They cannot have same records or same numbers. If Adam has for 1 to 4 there is no way that next record for Adam would be 3-4, or 4-5, all numbers 1,2,3,4 are blocked in this record.
    I need to check if in sheet “People” Adam all numbers in row 1 has included in sheet “Data” but those numbers are in “FROM” – “TO” format and that complicate the task.
    “Result” sheet is the final form of this macro. With Y if number in row 1 for Adam exist in sheet “Data” and N if not.

    “People”

    NAME 2 3 4 5 6
    ADAM001
    ANNA001
    JOHN002


    “Data”

    NAME FROM TO
    ADAM001 1 4
    ADAM001 9 15
    ADAM001 16 25
    ANNA001 10 26
    ANNA001 65 85
    JOHN002 1 10


    “Result”

    NAME 2 3 4 5 6
    ADAM001 Y Y Y N N
    ANNA001 N N N N N
    JOHN002 Y Y Y Y Y

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Searching for a number in the range (TABLE)

    Please attach an Excel file
    - Battle without fear gives no glory - Just try

+ 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] Searching a table and returning a corresponding number
    By Losguapos1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-09-2017, 04:16 PM
  2. [SOLVED] Searching for a range of values in a table
    By HyruleanHyroe in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-12-2016, 03:04 PM
  3. [SOLVED] Searching for unknown text string in a range and then matching it to a reference table
    By the_nibs in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 06-10-2015, 07:26 AM
  4. Searching for a number within a range
    By maguirepbm in forum Excel General
    Replies: 8
    Last Post: 09-22-2014, 09:35 AM
  5. Searching the particular numberfrom excel'2010 table and locate the number in Word'2010
    By jaffirahamed1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-21-2012, 08:09 AM
  6. Searching a range and returning row number
    By rocketup in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-06-2012, 11:47 AM
  7. [SOLVED] Searching a Range for a number over 40
    By annem in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-06-2006, 12:10 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