+ Reply to Thread
Results 1 to 14 of 14

column number of 3 cell containing text in a row

  1. #1
    Registered User
    Join Date
    12-27-2012
    Location
    concord ca
    MS-Off Ver
    Excel 2010
    Posts
    5

    column number of 3 cell containing text in a row

    I am trying to find the column number of the 3rd (or nth) occurrence of text in a cell in a 1 row table using a formula. The table looks like it contains date and value entries, but they are actually all formatted as text.

    i have attached the row in question.

    thanks for the help.

    john foley
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,841

    Re: column number of 3 cell containing text in a row

    Like this?
    Attached Files Attached Files
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: column number of 3 cell containing text in a row

    This is a lot simpler than Jacc's solution & doesn't need a helper row. It is an ARRAY formula and must be entered with CTRL + SHIFT + ENTER
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,913

    Re: column number of 3 cell containing text in a row

    find the attached file, i hope this is what you are looking for
    Attached Files Attached Files
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: column number of 3 cell containing text in a row

    nflsales, you could well be right in your interpretation of the OPs question. I thought he was looking for the nth occurrence of a specific piece of text, not any piece of text.

  6. #6
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,913

    Re: column number of 3 cell containing text in a row

    Mr Glenn can you tell me the mean of OPs

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: column number of 3 cell containing text in a row

    OP = Original Poster. the person who started the thread.

  8. #8
    Registered User
    Join Date
    12-27-2012
    Location
    concord ca
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: column number of 3 cell containing text in a row

    original poster. I am looking for the nth occurrence of any cell that contains text in a row.
    john

  9. #9
    Registered User
    Join Date
    12-27-2012
    Location
    concord ca
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: column number of 3 cell containing text in a row

    I think nflsales was closest, but i now see all the so called blank cells are filled with "", which is being read like text (i added a helper column to show this with istext).

    now i think it has to be solved with either filling the blank cells with zeros, so only the ones i am looking for read as text cells, or using the len function to look for cells with a length of one or greater.

    here is a new sample with the new parameters.

    I can't use helper rows in the answer, because it is a long sheet imported from another file, unless i shift them below the whole import.

    john
    Attached Files Attached Files
    Last edited by John Foley; 06-29-2014 at 12:05 AM.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: column number of 3 cell containing text in a row

    Yes, later on I did realise that that was probably what you wanted. Same formula as I used above, reset to count any non-zero value, entered as an Array Formula will work perfectly (I hope...).

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Set with CTRL + SHIFT + ENTER & drag down

  11. #11
    Registered User
    Join Date
    12-27-2012
    Location
    concord ca
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: column number of 3 cell containing text in a row

    i thought i would refresh this for new eyes.

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: column number of 3 cell containing text in a row

    Did you look at my solution at post 10? I have reattached it here (I modified your attachment to make it easier to see). Can you explain why it does not offer the solution that you wanted? Don't forget, it is an array formula & must be entered as CTRL + SHIFT + ENTER...
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    12-27-2012
    Location
    concord ca
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: column number of 3 cell containing text in a row

    the C14:BQ14<>0 portion of the formula kept giving me TRUE for every column no matter what variations i tried. I turned all they "" (or 0) cells to the unused naturally letter "Z" and used this formula and it worked.

    =SMALL(IF(M61:CB61<>"z", COLUMN(M61:CB61)), 2)

    less elegant, but it is working for my needs.

    John Foley 7/6/2014 12:21:37 AM

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: column number of 3 cell containing text in a row

    Were you picking the equation apart and running that bit separately? If so, it may well give odd result - it works in the array equation and got the answer correctly every time in your example. Can you show me exactly how it was failing?

+ 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. [SOLVED] Format row cell color based on number of text strings in a column
    By Pierce Quality in forum Excel General
    Replies: 22
    Last Post: 07-31-2013, 02:37 PM
  2. Replies: 4
    Last Post: 11-13-2012, 02:16 PM
  3. [SOLVED] need to move text after first number in a cell to the next column over
    By mikets in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-07-2012, 10:01 PM
  4. Replies: 0
    Last Post: 08-07-2012, 01:11 AM
  5. Replies: 1
    Last Post: 05-09-2012, 01:30 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