+ Reply to Thread
Results 1 to 8 of 8

MATCH() function help and/or workaround

  1. #1
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Pendleton, OR
    MS-Off Ver
    Excel 2013
    Posts
    129

    MATCH() function help and/or workaround

    I posted this earlier, but then the was getting a vB database error and now can't find it. My apologies if it eventually shows up twice.

    I am trying to use the MATCH() function to lookup a time when an instrument reached a certain value. For example, t = 0,1,2,3,4,5,6,...
    and value = 1,2,2,3,3,3,4,.... Since my values are in ascending order, I tried using =MATCH(3,array,1) to get the index. The problem is that the data is ascending but has repeat values. Excel will report the last value of 3, rather than the first. In this example t=5 (6th value) rather than t=3 (4th value).

    I do not think a VLOOKUP or HLOOKUP would behave this way, but the time values are in a separate array which makes them cumbersome. Any ideas, or alternate functions (nested functions?) that could solve this?

    Thanks in advance,

    J.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,440

    Re: MATCH() function help and/or workaround

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    https://support.office.com/en-us/art...9-533f4a37673a
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Pendleton, OR
    MS-Off Ver
    Excel 2013
    Posts
    129

    Re: MATCH() function help and/or workaround

    I think I have it. I need to lower the threshold value and add 1 when I index it. To find when it turned to 3 in the above example, I should use =MATCH(2,array,1)+1 to get the first time it became 3. This will work for me, but not sure how some fractional numbers will be rounded off, so may have to add an additional digit.

  4. #4
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Pendleton, OR
    MS-Off Ver
    Excel 2013
    Posts
    129

    Re: MATCH() function help and/or workaround

    Thanks, TMS. The exact match doesn't work for me because the data is not continuous like in my (poor) example. I might have values = 1,2,5,5,7,8.

  5. #5
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Pendleton, OR
    MS-Off Ver
    Excel 2013
    Posts
    129

    Re: MATCH() function help and/or workaround

    Thanks, TMS. The exact match doesn't work for me because the data is not continuous like in my (poor) example. I might have values = 1,2,5,5,7,8.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,440

    Re: MATCH() function help and/or workaround

    Fair enough, who knew

  7. #7
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,827

    Re: MATCH() function help and/or workaround

    I could see using a helper column like =time+COUNTIF(previoustimes,value)/50. That would get rid of the duplicate time entries and replace the duplicates with progressively larger values (The first 3 would still be 3, but the second 3 would be 3.02, the third 3 3.04, and so on). Then use this helper column as your lookup_array.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  8. #8
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,910

    Re: MATCH() function help and/or workaround

    Try this ...

    =MATCH(A1,F1:N1,--(COUNTIF(F1:N1,A1)=0))

+ 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] MATCH function workaround/documentation
    By johnnymac in forum Excel General
    Replies: 3
    Last Post: 02-01-2017, 02:33 PM
  2. [SOLVED] Workaround for Excel's VBA Rnd function
    By lunch_bracketeer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2013, 11:11 AM
  3. [SOLVED] MATCH function workaround - nesting ADDRESS function?
    By BishBosh in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-18-2013, 03:45 AM
  4. [SOLVED] Is there a workaround for no IFERROR function in 2003?
    By mrvp in forum Excel General
    Replies: 7
    Last Post: 07-22-2012, 11:46 AM
  5. Index/Match and return adjacent cell or workaround
    By alltimetop100 in forum Excel General
    Replies: 2
    Last Post: 03-02-2011, 08:24 AM
  6. MATCH() and duplicate values -- is there a workaround?
    By JimmyQ in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-10-2006, 05:40 AM
  7. [SOLVED] MATCH() and duplicate values -- is there a workaround?
    By JimmyQ in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-09-2006, 02:14 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