+ Reply to Thread
Results 1 to 7 of 7

Formula to find and return text in a range of cells

  1. #1
    Registered User
    Join Date
    01-12-2012
    Location
    Orlando, FL
    MS-Off Ver
    2010
    Posts
    46

    Formula to find and return text in a range of cells

    Hello-

    I'm looking for a formula that will search an entire row and return any text it finds. Each row only has 1 word in it but the word can appear in any one of 20 columns. All other cells in the row are blank. I'm trying to create 1 vertical list of all the words that are spread throughout a large table.

    Visual aid is attached.

    Thanks in advance
    Attached Files Attached Files

  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,630

    Re: Formula to find and return text in a range of cells

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    in a column beyond CI and copy down as far as the data extends.


    Regards, TMS
    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
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Formula to find and return text in a range of cells

    Try this, copied down...
    =INDEX($A1:$M1,MATCH(TRUE,INDEX(($A1:$M1<>0),0),0))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    07-21-2015
    Location
    London, Canada
    MS-Off Ver
    2013
    Posts
    4

    Re: Formula to find and return text in a range of cells

    Try this in cell CI1

    =LOOKUP(2,1/(A1:CH1<>""),A1:CH1)

    and copy down column CI.

    bdika

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

    Re: Formula to find and return text in a range of cells

    Here's another one...

    Data Range
    A
    B
    C
    D
    E
    1
    This
    ------
    ------
    This
    ------
    2
    That
    ------
    That
    ------
    ------
    3
    Other
    Other
    ------
    ------
    ------
    4
    Stuff
    ------
    ------
    ------
    Stuff
    5
    Yinz
    ------
    Yinz
    ------
    ------


    This formula entered in A1 and copied down:

    =INDEX(B1:E1,MATCH("zzzzz",B1:E1))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Formula to find and return text in a range of cells

    Tony, what is the significance of the z's? You used 5, Trvor used 50
    Last edited by FDibbins; 07-23-2015 at 07:06 PM. Reason: cant spell

  7. #7
    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,630

    Re: Formula to find and return text in a range of cells

    @Ford: just an arbitrary number of alpha characters that will be alphabetically greater than anything in the data area, and hence will not be found ... returning the "next lower" alpha string.

    Regards, Trevor

+ 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: 2
    Last Post: 09-07-2013, 07:50 PM
  2. [SOLVED] Formula to find a specific text within a range and return the value in the next cell
    By 00pumpkin in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-19-2013, 02:11 PM
  3. Replies: 9
    Last Post: 07-03-2013, 07:39 AM
  4. statement / formula to return text from a range of cells
    By nellyc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-30-2013, 07:55 AM
  5. Formula to Find If Text In a Cell Matches Another Range of Cells
    By purplesamcat in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-03-2013, 07:45 PM
  6. Replies: 7
    Last Post: 09-18-2012, 04:17 PM
  7. Find, return string address in a range of cells with numbers and text
    By Vera22 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-09-2007, 08:37 PM
  8. Formula to find text on a page and return that cells name.
    By Kevin in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-02-2005, 10:05 AM

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