+ Reply to Thread
Results 1 to 7 of 7

Function that will bring in text if it exists in one of every other cell on the same row.

  1. #1
    Registered User
    Join Date
    06-19-2005
    Posts
    49

    Function that will bring in text if it exists in one of every other cell on the same row.

    I need a function that will bring in text if it exists in one of every other cell on the same row to the end of the worksheet.

    So for instance, the function will reside in cell A1. If text exists in C1 or E1 or G1 . . . . in that series, all the way to the end of the worksheet, I need that text. Assume text only exists in one of the cells of interest (in only one of the odd columned cells on that row).

    I will have text in the even columned cells (B1, D1, F1 . . . ) that I will want to ignore.

    I also need as a separate function the cell address where that text arrived at above is found.

    Thanks much!

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

    Re: Function that will bring in text if it exists in one of every other cell on the same r

    Try this

    To return text
    =INDEX(C1:FM1,MATCH(1,INDEX((ISTEXT(C1:FM1))*(MOD(COLUMN(C1:FM1),2)=MOD(COLUMN(C1),2)),0),0))

    Address of cell
    =ADDRESS(ROW(),MATCH(1,INDEX((ISTEXT(C1:FM1))*(MOD(COLUMN(C1:FM1),2)=MOD(COLUMN(C1),2)),0),0)+2)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    06-19-2005
    Posts
    49

    Re: Function that will bring in text if it exists in one of every other cell on the same r

    awesome, thank you very much . . . works like a charm!

  4. #4
    Registered User
    Join Date
    06-19-2005
    Posts
    49

    Re: Function that will bring in text if it exists in one of every other cell on the same r

    Except one thing, the cell address function is not relative . . . so if i get a 'hit' 2 columns away from the function, the cell address is column "C" even though my function is input in column F. If my cell address function is input in column F and my 'hit' is two columns away, the cell address should reference column H . . . but it doesn't, it references column C.

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

    Re: Function that will bring in text if it exists in one of every other cell on the same r

    the +2 at the end of the formula takes into account the fact that your range (C1:FM1)starts from Column C

    Adjust accordingly
    i.e.
    for D:FM use +3
    for E:FM use +4
    and so on

  6. #6
    Registered User
    Join Date
    06-19-2005
    Posts
    49

    Re: Function that will bring in text if it exists in one of every other cell on the same r

    I see, I got it, thank you.

  7. #7
    Registered User
    Join Date
    06-19-2005
    Posts
    49

    Re: Function that will bring in text if it exists in one of every other cell on the same r

    Ok this works very well and I thank you. These functions render the 'first hit' of text in the row of possible texts. As a variation now, I would like a function or UDF that toggles the next bit of text that exists that meets the criteria in the sequence first described above.

+ 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. How To Verify a Certain value/text in a cell Exists in another worksheet
    By Famelie in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-14-2013, 02:26 AM
  2. How to bring text to cell from column
    By rcurious in forum Excel General
    Replies: 7
    Last Post: 07-04-2010, 12:38 PM
  3. Replies: 12
    Last Post: 01-14-2008, 03:01 PM
  4. [SOLVED] If text exists pull text from another cell....how to do it?
    By Trip Poly in forum Excel General
    Replies: 1
    Last Post: 04-12-2006, 05:00 PM
  5. [SOLVED] Find a non-blank cell and bring back text a in same row
    By Rod in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-24-2005, 06:06 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