+ Reply to Thread
Results 1 to 4 of 4

How to find if the content in a cell is between the values of 2 different cells.

  1. #1
    Registered User
    Join Date
    01-26-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    6

    How to find if the content in a cell is between the values of 2 different cells.

    Hi, I have an excel worksheet; in that worksheet contains a column. Each cell in that column holds different kinds of data, it looks like this...

    column1 from first spreadsheet
    22853
    33901
    0045T
    90750
    etc, etc...

    I have another excel worksheet that has two columns, it looks like this...

    column1 from 2nd spreadsheet column2 from 2nd spreadsheet
    G0389 null
    59840 59857
    0040T 0080T
    90750 null
    4560 5000
    etc, etc... etc, etc...

    How do I find if a value from a cell from the column from the first spreadsheet is in the range of the values of column1 and column2 from the second spreadsheet? For instance value 0045T is between 0040T and 0080T and
    90750 is between 90750 and null. Thank you

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,182

    Re: How to find if the content in a cell is between the values of 2 different cells.

    Try this ...

    =OR(COUNTIF(Sheet2!$A$1:$A$5,Sheet1!A1),COUNTIFS(Sheet2!$A$1:$A$5,"<="&Sheet1!A1,Sheet2!$B$1:$B$5,">="&Sheet1!A1))
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    01-26-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: How to find if the content in a cell is between the values of 2 different cells.

    Thank you so much for your help. It worked.

  4. #4
    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
    53,050

    Re: How to find if the content in a cell is between the values of 2 different cells.

    I knew I had seen this before.
    x-posted here
    http://www.mrexcel.com/forum/excel-q...ent-cells.html
    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. Find cells with same content and copy
    By Stadi in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-16-2014, 10:29 AM
  2. Automatically copy cells content based on the content of another cell.
    By chrisbarlow1984 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-01-2014, 11:13 AM
  3. Find and highlight cells in workbook that is NOT an exact match to the cell content
    By AndyHowcroft in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-30-2013, 12:05 AM
  4. Find and replace, copying content of one cell to a range of cells.
    By Tavendale in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-26-2013, 02:19 PM
  5. [SOLVED] Highlight a cell if its content doesn't match another cells content
    By noxygen in forum Excel General
    Replies: 4
    Last Post: 04-12-2012, 04:36 AM
  6. [SOLVED] how do i find cells that repeat the same content?
    By cdoyle in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-22-2005, 11:05 AM
  7. Can't find cells to change content?
    By NS in forum Excel General
    Replies: 1
    Last Post: 07-29-2005, 05:05 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