+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Match for a value in an array (60x40) and return the row no. of the value found

Hybrid View

  1. #1
    Registered User
    Join Date
    07-16-2012
    Location
    mumbai
    MS-Off Ver
    Excel 2007
    Posts
    3

    Match for a value in an array (60x40) and return the row no. of the value found

    Hi,

    I'm trying to find a formula that can find a value in a specified array and return the row no. of the value found.

    Example:

    In Sheet 1:
    I have an array of texts (A1:AN60) where cell D21 contains the text "olive"

    Sheet2:
    Cell A1 has the value "olive"
    What formula should I apply in Cell B1 (without VBA) that can be applied on the above specified array (in sheet 1) to return the row number of the match found i.e. returns the number 21

    Thanks in advance!!

    Regards
    Nipun

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Match for a value in an array (60x40) and return the row no. of the value found

    Try:

    =SUMPRODUCT((Sheet1!A1:AN60=A1)*(ROW(Sheet1!A1:AN60)-ROW(Sheet1!A1)+1))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    07-16-2012
    Location
    mumbai
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Match for a value in an array (60x40) and return the row no. of the value found

    Worked!

    Thanks a lot for the quick response )

  4. #4
    Registered User
    Join Date
    07-16-2012
    Location
    mumbai
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Match for a value in an array (60x40) and return the row no. of the value found

    This formula is giving incorrect result for a few arguments..not able to figure out why

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Match for a value in an array (60x40) and return the row no. of the value found

    If you have duplicates in the database it will give incorrect results....

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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