+ Reply to Thread
Results 1 to 2 of 2

Formula to compare one value to other values in a table and returning corresponding value

  1. #1
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Formula to compare one value to other values in a table and returning corresponding value

    I am trying to write an Excel formula in a cell in my main worksheet that has a value that needs to be compared to a table in another worksheet that has a low (column A) and high value (column B) (this table has 17 rows that list low and high values and the corresponding value). Depending on which row the value from the first worksheet falls between, the corresponding value in column C of the second worksheet should be returned. The values are all in percent format (99.80% for example).

    Worksheet 1 Value in column A is:
    99.50

    Worksheet 2 Value Table

    Low High Return Value
    99.80 100.00 $5000
    99.50 99.79 $10,000

    In this case, the return value in worksheet 1 column B would be $10,000 since 99.51 is greater than 99.50 and less than 99.79.

  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,778

    Re: Formula to compare one value to other values in a table and returning corresponding va

    You need to use VLOOKUP. However, the values in the lookup table (your worksheet 2 table) will need to be arranged from low to high and the type of lookup needs to be set as an approximate result. Something like this:

    =VLOOKUP(A1,Sheet2!$A$1:$C$10,3,1)

    where A1 is the number to look up on worksheet 1, the lookup array is on worksheet 2 (arranged in low to high order), 3 is the column of the number to return and 1 tells Excel that it's an approximate match.
    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.

+ 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. returning distinct values from a table
    By dc51786 in forum Excel General
    Replies: 17
    Last Post: 08-01-2014, 03:32 AM
  2. returning distinct values from a table
    By dc51786 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-31-2014, 06:15 AM
  3. Replies: 1
    Last Post: 07-31-2013, 04:11 PM
  4. Returning data in one table based on the values from another table
    By excelignorant in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-24-2013, 04:12 AM
  5. [SOLVED] Returning All Possible Values from Table Lookup
    By vunanne in forum Excel General
    Replies: 12
    Last Post: 11-21-2012, 12:02 PM
  6. [SOLVED] Formula selection - Vlookup? Match? Pivot table? Returning multiple values
    By enigmaes in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-21-2012, 12:21 PM
  7. Replies: 0
    Last Post: 05-02-2008, 04:38 PM

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