+ Reply to Thread
Results 1 to 3 of 3

Find which of 5 Columns has Text, and Populate New Cell with this Text

  1. #1
    Forum Contributor
    Join Date
    12-03-2008
    Location
    Key West, FL
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    665

    Find which of 5 Columns has Text, and Populate New Cell with this Text

    I've attached a workbook which illustrates what I'd like to do.

    The workbook will have a range of 5 columns in which only one column will be populated with some letters, while the other columns will be empty (with a ""). I want the 6th column to look to the left and find the column which has letters in it, and then populate itself with those letters.

    I know I could do this with a long nested IF formula but I'm wondering if there's more efficient formula to do this.

    Any suggestions? Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Find which of 5 Columns has Text, and Populate New Cell with this Text

    In G8

    For first non-blank cell
    =INDEX(B8:F8,MATCH(TRUE,INDEX((B8:F8<>0),0),0))


    For last non-blank cell (if there is more than one)
    =LOOKUP(2,1/(B8:F8<>""),B8:F8)


    Copy down
    Last edited by Ace_XL; 12-26-2019 at 12:26 PM.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Contributor
    Join Date
    12-03-2008
    Location
    Key West, FL
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    665

    Re: Find which of 5 Columns has Text, and Populate New Cell with this Text

    Thanks Ace! That worked.

+ 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. Find Matching Text in Two Columns within a Text Phrase
    By Danielc1234 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-02-2019, 03:15 PM
  2. If find text in column, put text in cell 5 columns over?
    By nobodyukno in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-07-2017, 04:07 PM
  3. [SOLVED] Search through columns and find specific text and replace that text with header column
    By adamzee in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-09-2014, 11:59 PM
  4. Replies: 2
    Last Post: 03-17-2014, 12:14 PM
  5. Replies: 7
    Last Post: 09-03-2013, 04:43 PM
  6. Replies: 2
    Last Post: 01-30-2013, 12:59 PM
  7. [SOLVED] Find cell with specific text in a row, then rearrange the columns
    By cyin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-17-2012, 11:10 AM

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