Results 1 to 28 of 28

NthMatch UDF as An Alternative to Array function...

Threaded View

  1. #16
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Cool Re: NthMatch UDF as An Alternative to Array function...

    Hi KVS and all Experts.
    Have a look, NthMatch Redefined
    Function NthMatch(ByVal Lvalue As Variant, Lrange As Variant, Mnum As Variant)
        Mstr = "|" & Join(Application.Transpose(Lrange), "|") & "|"
        Start = 1
        
        For c = 1 To Mnum
            Found = InStr(Start, Mstr, Lvalue)
            If Found = 0 Then NthMatch = "#N/A": End
            Start = Found + 1
        Next
        
        Temp = Left(Mstr, Found)
        RowNo = Len(Temp) - Len(Replace(Temp, "|", ""))
        NthMatch = RowNo
            
    End Function
    Note:- The file doen't contain the same code. So Copy and paste from here.
    Check the attached file:-
    Last edited by Vikas_Gautam; 01-09-2015 at 07:53 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Alternative to using an array formula for {=LARGE(IF(... function
    By Rabiah in forum Excel Formulas & Functions
    Replies: 28
    Last Post: 05-30-2014, 05:52 AM
  2. UDF Lookup function as an alternative to array functions & match/index
    By Andrew_Harris in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-15-2012, 09:34 PM
  3. [SOLVED] Non array alternative for percentile function
    By vandan_tanna in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-22-2012, 11:43 AM
  4. Alternative to an array formula.
    By RunHard in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-16-2009, 09:18 AM
  5. Array Formula Alternative
    By smninos in forum Excel General
    Replies: 10
    Last Post: 07-15-2009, 04:31 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