+ Reply to Thread
Results 1 to 4 of 4

Question about identifying a value based on a range.

  1. #1
    Registered User
    Join Date
    04-04-2013
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2010
    Posts
    69

    Lightbulb Question about identifying a value based on a range.

    I have two tables,

    one table (TABLE1) contains the name and a mile point a

    the other table (TABLE2) contains name, mile point 1, mile point 2, and other data

    I want to be able to pull data from TABLE2, based on TABLE1's name and MP. I want to be able to select data from TABLE2 whose name and mile point's fit with the data from TABLE1

    Line MP A SYS
    100 8 ?


    TABLE2

    SYS Line MP1 MP2 DATA
    A 100 0 5 BOB
    A 100 5 10 KON
    B 100 10 15 B

    i want to be able to replace the ? from table1 with the correct SYS from table2 based on the MP given

    i started with something like
    =if(and(name=name,mpa=>mp1,mpa=<mp2)),vlookup...

    the problem is this doesnt work because im comparing one to many.
    Last edited by rgrocks; 04-17-2014 at 01:03 PM.

  2. #2
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,617

    Re: Question about identifying a value based on a range.

    Where in table 2 is MPA? What would you expect the answer in table 1 to be and why?
    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.

  3. #3
    Registered User
    Join Date
    04-04-2013
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Question about identifying a value based on a range.

    MPA exist in table 1. MPA's value will fall inbetween MP1 and MP2 in TABLE 2. In this case since MPA is 8 and Line is 100, it falls between 5 and 10 on Line 100 in Table 2. I want Table 1 to return the SYS value "A"

  4. #4
    Registered User
    Join Date
    04-04-2013
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Question about identifying a value based on a range.

    Maybe I'm doing a poor job explaining.

    TABLE1 has the identifying information, in this case I have a name and mile point (MPa)

    TABLE2 has name and a range of mile points (MP1 and MP2)

    I want to use name from TABLE1 to match with name from TABLE2, but there is alot of instances of the same name in TABLE2 (one to many)

    Then I want to single out the specific record from TABLE2 that the record from TABLE1 implies by using MPa.

    MPa should fall inbetween MP1 and MP2 from TABLE2. In the example above, this would correlate the 2nd record from TABLE2 because MPa=8 and Name=100, which falls between MP1 and MP2 only (5 and 10) with the same name=100.

    Does this make more sense?

+ 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, identifying a range
    By Danny in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  2. [SOLVED] vba, identifying a range
    By Danny in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  3. [SOLVED] vba, identifying a range
    By Danny in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 AM
  4. [SOLVED] vba, identifying a range
    By Danny in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  5. vba, identifying a range
    By Danny in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM

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