+ Reply to Thread
Results 1 to 15 of 15

Find most words in string with numbers included

  1. #1
    Forum Contributor
    Join Date
    06-27-2014
    Location
    Margate, FL
    MS-Off Ver
    MS Office 365
    Posts
    247

    Question Find most words in string with numbers included

    Hello,
    I hope someone can help me with this.. I'm looking for a formula that will find the "text" within a string of texts and numbers like this example below. So if this was my string going across from A1-H1, I want to return the value of "SR". I want to overlook the numbers in the cell. Is this possible?

    In cell A1 - SR , In cell B1 - 8 , In cell C1 - SR , In cell D1 - 8 , In cell E1 - SR , In cell F1 - 8 , In cell G1 - SR , In cell H1 - 8 = SR

    Thank you so much.

    Trish

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,765

    Re: Find most words in string with numbers included

    I do not understand to be honest.
    Please check yellow banner at the top of page and attached samples file.
    Please put there expected results and clear explanation of a problem.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Forum Contributor
    Join Date
    06-27-2014
    Location
    Margate, FL
    MS-Off Ver
    MS Office 365
    Posts
    247

    Re: Find most words in string with numbers included

    Please see attached.
    Attached Files Attached Files

  4. #4
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,765

    Re: Find most words in string with numbers included

    What if it will be like this:

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    N
    1
    SUNDAY
    MONDAY
    TUESDAY
    WEDNESDAY
    THURSDAY
    FRIDAY
    SATURDAY
    2
    LOCATION
    HOURS
    LOCATION
    HOURS
    LOCATION
    HOURS
    LOCATION
    HOURS
    LOCATION
    HOURS
    LOCATION
    HOURS
    LOCATION
    HOURS
    3
    SR
    8
    SR
    5
    NW
    5
    SR
    8
    BG
    8
    SR
    6
    SR
    8
    Sheet: Sheet1

    You want to find most occurence location or what?

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Find most words in string with numbers included

    Unless I'm missing something, why not just
    =A3

  6. #6
    Forum Contributor
    Join Date
    06-27-2014
    Location
    Margate, FL
    MS-Off Ver
    MS Office 365
    Posts
    247

    Re: Find most words in string with numbers included

    I'm trying to return the location in this case (SR) from the string.. This is a list of an employee's hours for the week. Sometimes he goes to location "SR" and works the hours next to the location but yes to answer your question, i just need the most occurence location from that string. The problem i was having was that since there is numbers in between, my formula wouldnt return the SR.. My original formula looked like this:

    =INDEX(A3:N3,MODE(MATCH(A3:N3,A3:N3,0)))

    but if the employee didnt work on a Sunday or something, it would return 0.00

  7. #7
    Forum Contributor
    Join Date
    06-27-2014
    Location
    Margate, FL
    MS-Off Ver
    MS Office 365
    Posts
    247

    Re: Find most words in string with numbers included

    Hi Fluff,

    I need the number to go across not down, so I wouldn't be able to use that.

  8. #8
    Forum Contributor
    Join Date
    06-27-2014
    Location
    Margate, FL
    MS-Off Ver
    MS Office 365
    Posts
    247

    Re: Find most words in string with numbers included

    KOKOSEK,

    Will you be able to help me with this one?

  9. #9
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,987

    Re: Find most words in string with numbers included

    O3=INDEX(A3:N3,MODE(IF(ISTEXT(A3:N3),MATCH(A3:N3,A3:N3,0))))

    control+shift+enter


    P3=SUM(A3:N3)
    Last edited by CARACALLA; 03-19-2020 at 03:49 PM.

  10. #10
    Forum Contributor
    Join Date
    06-27-2014
    Location
    Margate, FL
    MS-Off Ver
    MS Office 365
    Posts
    247

    Re: Find most words in string with numbers included

    Thank you Caracalla.. That worked except for when there is no data i got an error message, how can I add to the formula to return blank if there is no data?

  11. #11
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,987

    Re: Find most words in string with numbers included

    You confirmed the formula with

    control + shift + enter ?

  12. #12
    Forum Contributor
    Join Date
    06-27-2014
    Location
    Margate, FL
    MS-Off Ver
    MS Office 365
    Posts
    247

    Re: Find most words in string with numbers included

    Yes i did and it worked with the ones with data but the cells without i got an #N/A error

  13. #13
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,987

    Re: Find most words in string with numbers included

    O3=IFERROR(INDEX(A3:N3,MODE(IF(ISTEXT(A3:N3),MATCH(A3:N3,A3:N3,0)))),"")

    Control+shift+enter

  14. #14
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Find most words in string with numbers included

    Just wrap it in an Iferror
    =iferror(INDEX(A3:N3,MODE(IF(ISTEXT(A3:N3),MATCH(A3:N3,A3:N3,0)))),"")

  15. #15
    Forum Contributor
    Join Date
    06-27-2014
    Location
    Margate, FL
    MS-Off Ver
    MS Office 365
    Posts
    247

    Re: Find most words in string with numbers included

    Perfect thank you and be safe...

+ 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] Formula to Find a Match of String of Numbers in a Larger String of Numbers
    By MattAquino in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-16-2019, 12:30 PM
  2. [SOLVED] Find matching words in a text string and return one of four words
    By alecoute in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-12-2018, 12:33 PM
  3. Find and replace parts in string with words, numbers from a table
    By moosmahna in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-26-2017, 11:54 AM
  4. Replies: 2
    Last Post: 10-28-2015, 08:55 AM
  5. Help! Extract numbers/words from a string in excel not use VBA
    By Yuan Peng in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-28-2015, 08:46 AM
  6. Find some words in a string
    By larrygoldstein in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-16-2014, 08:56 AM
  7. String with words and numbers
    By jkessler in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-01-2012, 10:09 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