+ Reply to Thread
Results 1 to 7 of 7

Formula for finding a cell value within another range of cells

  1. #1
    Registered User
    Join Date
    05-10-2014
    MS-Off Ver
    Excel 2003
    Posts
    2

    Post Formula for finding a cell value within another range of cells

    I have value of 26 in Cell A1, for example and I want to find
    whether or not that value falls with a range of cells B1:C2 (which is in another sheet) and
    if so return the value in D Range.



    A1 B C D
    26 20 30 100



    How would my formula look?

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Formula for finding a cell value within another range of cells

    I'm presuming you meant C1 rather than C2?
    If so, try the below formula.

    =IF(AND(A1>=B1,A1<=C1),D1,"")

  3. #3
    Registered User
    Join Date
    05-10-2014
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Formula for finding a cell value within another range of cells

    Hi thank you for your reply. Actually looking to find the value in a range. So it can be anywhere
    from B1 C1 through B3 through C3. for example

    Column Column
    B C
    10 11
    12 26
    27 30

    So in this case 26 would match the range B2:C2

    Hope this makes sense.

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Formula for finding a cell value within another range of cells

    Hi,

    You don't say what the result should be if the value appears more than once in that range, in different rows, but perhaps:

    =SUMPRODUCT((B1:C3=A1)*D1:D3)

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  5. #5
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Formula for finding a cell value within another range of cells

    Or, if the ranges are never going to overlap, i.e. in your latest example the cell under 27 will be 31 because it's next after 30, then you could use this approach (see attached).
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-03-2009
    Location
    San Bruno, CA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Formula for finding a cell value within another range of cells

    Ah I guess Im not explaining properly. See if my sample attached helps. Visuals are better. Thanks again for your help.
    Attached Images Attached Images

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,930

    Re: Formula for finding a cell value within another range of cells

    calvob, your IP indicates that you are also bcholland? If so, why the need for a 2nd ID?

    A quick observation on your picture -
    1st, please do not upload a picture of your file...rather, upload a sample of your workbook, showing what data you are working with, a few samples of your expected outcome is (manually entered is ok) and how you arrived at that. (exclude sensitive info). Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you Also, not all members can upload picture files (Company firewalls and stuff)

    Having said that, I was able to look at your pic, and it looks to me that your "numbers" are actually text that just looks like a number (look at the small green triangle in each cell)

    How are those cells being populated? you will need to convert them to numbers (there are various ways to do that), otherwise it's like asking - does Orange fall between March and Soccer
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Formula for finding data over range of cells
    By mikee15 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-17-2014, 02:15 PM
  2. [SOLVED] Finding the first empy cell in a set range of cells
    By jshaw82 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-06-2013, 04:39 PM
  3. [SOLVED] finding min and max value in a range of cells defined by a third cell
    By Narayan~ in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-12-2012, 12:58 PM
  4. Replies: 1
    Last Post: 06-10-2011, 08:30 AM
  5. Finding a particular cell reference among a range of cells
    By deathbybowtie in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-12-2009, 04:42 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