+ Reply to Thread
Results 1 to 14 of 14

Find value in array then display that value

Hybrid View

  1. #1
    Registered User
    Join Date
    09-07-2022
    Location
    New York
    MS-Off Ver
    2205
    Posts
    1

    Find value in array then display that value

    Hello!

    I have an array of 8 columns and 50+ rows. Each row has one value that falls somewhere in the 8 columns. The rest of the columns are empty. I need a function to search the row for the value and then display that value in one cell.

    Capture.PNG

    Please let me know if you can help.

    Thank you,
    Jesse

  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
    48,085

    Re: Find value in array then display that value

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file.
    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 Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,739

    Re: Find value in array then display that value

    If you are using 365 with the TOCOL function, how about
    Formula: copy to clipboard
    =TOCOL(A3:H50,1)

  4. #4
    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
    48,085

    Re: Find value in array then display that value

    If you don't have TOCOL then maybe try the old fashioned way:
    Formula: copy to clipboard
    =INDEX(A1:H1,MATCH("zzz", A1:H1,1))
    copied down.

  5. #5
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Find value in array then display that value

    An other possibility with XLOOKUP (available from Excel 2016)

    Please try in I3 and copy down:
    Formula: copy to clipboard
    =XLOOKUP(TRUE,""<>A3:H3,A3:H3,A3:H3)

  6. #6
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    273

    Re: Find value in array then display that value

    Xlookup is not available in Excel 2016 unless you have a subscription, probably.
    =lookup(2,1/(a3:h3<>""),a3:h3)

  7. #7
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Find value in array then display that value

    Quote Originally Posted by T.I. View Post
    Xlookup is not available in Excel 2016
    According Microsoft is XLOOKUP available in Excel 2016. See https://support.microsoft.com/en-us/...9-88eae8bf5929
    [Click on more!]

  8. #8
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Find value in array then display that value

    Oh yes, the rest of the columns are empty.

    Then I have 1 more solution for Excel 365/2021 users:
    Formula: copy to clipboard
    =TEXTJOIN(,,A3:H3)

  9. #9
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    273
    Quote Originally Posted by HansDouwe View Post
    According Microsoft is XLOOKUP available in Excel 2016.
    Hmm.. Notification from the link you've provided clearly states that it doesn't))
    Note: XLOOKUP is not available in Excel 2016 and Excel 2019,
    .
    Besides, I'm using office 2013 and 2016 PP...

  10. #10
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Find value in array then display that value

    The information on Microsoft's site confuses me. Because above it can be read (if you clicked on More) that the function is available.
    Attachment 795281

  11. #11
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    273

    Re: Find value in array then display that value

    No matter how many times I click More or Less on Microsoft site, the function, alas, doesn't want to appear in a formula bar.
    I suppose it might be available for those who have a subscription, but not sure...

  12. #12
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,175

    Re: Find value in array then display that value

    Or try

    =LOOKUP("zzzzz",A3:H3)

  13. #13
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    3,178

    Re: Find value in array then display that value

    Yeah, XLOOKUP didn't come out until 365. It is confusing though. I wonder if you are on 2019 (or 2016) that it will *use* the formula if you are working with a file that was CREATED in 365, but I don't think you can write the formula in 2019 or 2016.

  14. #14
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    273

    Re: Find value in array then display that value

    Yes, old offices allow to see the output from new functions at least until you try to change it, and at the same time warning you with _xlfn. prefix in front of a formula that it was created in a newer office.

+ 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: 06-07-2022, 09:30 AM
  2. Replies: 7
    Last Post: 12-11-2021, 06:45 AM
  3. Display values from an moving array and display
    By brayboyce in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-25-2019, 12:22 PM
  4. find array length got using split feature and valdate array elements
    By malathi1972 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-21-2018, 04:51 AM
  5. [SOLVED] Find text in array and display related data
    By KimMorgan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-17-2016, 04:53 PM
  6. [SOLVED] Find cell in 2nd array using row and column from the first array Excel 2010 VBA
    By crywolf in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-08-2015, 02:12 PM
  7. Find and display the last occurance in two columns and display related cell
    By willia97 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-28-2012, 08: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