+ Reply to Thread
Results 1 to 8 of 8

Find 1st Occurrence of Number and Return Value In nth Column

  1. #1
    Registered User
    Join Date
    08-27-2015
    Location
    Boston, MA
    MS-Off Ver
    2010
    Posts
    4

    Find 1st Occurrence of Number and Return Value In nth Column

    Hi Everyone,

    I am trying to use VLOOKUP to find the first occurrence of a number and then return the value in a column in the same row. I keep getting an error message when using the ">" operator. The lookup column is DAYS and the values are calculated from a data set that uses seconds as the time stamp, therefore the DAYS column is reported in fractions of a day.

    For example, I want to extract the data point from column Data 3 when the day changes from <1 to >1. I know this should be a simple formula, but cannot get past the error.

    I am using the following: =VLOOKUP(>1,A2:D9,4,FALSE) in an attempt to return the value 13.760.

    Day Data 1 Data 2 Data 3
    0.98 3.365 0.953 13.845
    0.98 3.365 0.952 13.8271
    0.99 3.365 0.950 13.765
    0.99 3.365 0.952 13.817
    0.99 3.364 0.950 13.751
    1.01 3.365 0.950 13.760
    1.02 3.365 0.949 13.717
    1.03 3.364 0.948 13.708
    1.04 3.364 0.948 13.703


    Thanks in advance for your help.

    Ed
    Last edited by esiegal; 08-27-2015 at 09:45 AM.

  2. #2
    Forum Contributor
    Join Date
    08-04-2014
    Location
    Riga
    MS-Off Ver
    2010
    Posts
    579

    Re: Find 1st Occurrence of Number and Return Value In nth Column

    Perhaps you can use IF?

    =IF(A2>1;D2;FALSE)

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Find 1st Occurrence of Number and Return Value In nth Column

    I would use Index Match
    =INDEX($D$2:$D$9, MATCH(1, $A$2:$A$9)+1)
    1 represents the largest number under what you are looking for, or the value you need to be greater than.
    Questions?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Find 1st Occurrence of Number and Return Value In nth Column

    Try this array formula**:

    =INDEX(D2:D9,MATCH(TRUE,A2:A9>1,0))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    08-27-2015
    Location
    Boston, MA
    MS-Off Ver
    2010
    Posts
    4

    Re: Find 1st Occurrence of Number and Return Value In nth Column

    Thanks bmouse... unfortunately, this will not return just the first occurrence in the entire array!

  6. #6
    Registered User
    Join Date
    08-27-2015
    Location
    Boston, MA
    MS-Off Ver
    2010
    Posts
    4

    Re: Find 1st Occurrence of Number and Return Value In nth Column

    Thank you Tony.... This does the trick!

  7. #7
    Registered User
    Join Date
    08-27-2015
    Location
    Boston, MA
    MS-Off Ver
    2010
    Posts
    4

    Re: Find 1st Occurrence of Number and Return Value In nth Column

    Thanks ChemistB.... saw Tony's response before yours and his did the trick. I appreciate the help!!!

    Ed

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Find 1st Occurrence of Number and Return Value In nth Column

    You're welcome. Thanks for the feedback!

+ 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. Replies: 6
    Last Post: 03-23-2015, 07:17 AM
  2. Find each occurrence in a column and do for each occurrence
    By jfoerch in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-21-2014, 12:29 PM
  3. Replies: 3
    Last Post: 09-15-2014, 07:56 PM
  4. Replies: 5
    Last Post: 02-13-2014, 05:37 PM
  5. [SOLVED] Find last occurrence of text in a column and return value in next column
    By LindaLu in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-06-2014, 09:45 AM
  6. [SOLVED] Find Duplicates and Add Number of Occurrence
    By Jonathan78 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-16-2013, 12:15 PM
  7. Return the Last Occurrence of a Number in Range
    By ElmerS in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 12-16-2008, 04:25 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