+ Reply to Thread
Results 1 to 3 of 3

"Lookup" formula for a range of values (instead of a value)

  1. #1
    Registered User
    Join Date
    11-06-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    "Lookup" formula for a range of values (instead of a value)

    I have a large amount of data. In column A is the time, in column B is the data.

    I would like to display in a new location when the data is in between 2 values. So I don't want to highlight the data that falls into this desired range (because then I still have to look through the data). I want to paste the time stamp corresponding to each time the data falls into this desired range.

    Example:
    If the desired range is 10<x<20, then I'd like to post in ColC each time stamp from ColA when the data from ColB falls in this range:

    A - B - C
    1 - 5 - 3
    2 - 5 - 5
    3 - 12
    4 - 30
    5 - 14

    Any Help?

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,296

    Re: "Lookup" formula for a range of values (instead of a value)

    Array enter this in C1 (use Ctrl-Shift-Enter instead of just enter)
    =IF(COUNTIFS(B:B,">=10",B:B,"<=20")>=ROW(A1),INDEX(A:A,SMALL(IF($B$1:$B$1000>=10,IF($B$1:$B$1000<=20,ROW($B$1:$B$1000))),ROW(A1))),"")
    then copy down until it returns blanks.
    Last edited by Bernie Deitrick; 04-25-2014 at 02:12 PM.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    11-06-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: "Lookup" formula for a range of values (instead of a value)

    Perfect thanks for the quick help! Much appreciated! I'll modify to fit my needs now and I'm good to go.

+ 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] I want Range("A1:K1") values divide to "4" in the Range("L1:U1") cells.
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-15-2013, 09:56 PM
  2. Replies: 0
    Last Post: 11-22-2013, 01:36 PM
  3. Replies: 3
    Last Post: 04-14-2013, 11:53 PM
  4. [SOLVED] Formula needed to display "Pass" or "Fail" if a column contains any values other than "yes
    By andreindy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-26-2013, 05:49 PM
  5. [SOLVED] Pasting values between ranges in different workbooks: "Range" works but "Cells" doesn't
    By Flaubert in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-13-2013, 01:19 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