+ Reply to Thread
Results 1 to 16 of 16

Finding specific text in a cell with inexact results

  1. #1
    Forum Contributor
    Join Date
    01-25-2013
    Location
    near Philly, PA USA
    MS-Off Ver
    Excel 2019
    Posts
    178

    Finding specific text in a cell with inexact results

    I've a column of 700+ names with professional title (Chair, Professor, Associate Professor, etc...).
    I'm trying to find the occurrences of these titles in one cell, then placing an X in another cell based on formulas that follow.

    Formula for Professor (in one column):
    Please Login or Register  to view this content.
    Formula for Assistant Professor (in another column):
    Please Login or Register  to view this content.
    If I search a cell containing:
    Associate Professor

    both formulas place an X. So the first is finding Professor and the second is finding Assistant Professor.

    How can I change the formula to get discriminate results?

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Finding specific text in a cell with inexact results

    If the cell only contains 1 title, you could use something like this:
    =IF($W7="Professor","X","-"), this would assume the titles didn't have leading/trailing spaces
    =IF(TRIM($W7)="Professor","X","-") if in doubt
    if the cell is more complex, would need to see some example of the data

    Hope this helps
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  3. #3
    Forum Contributor
    Join Date
    01-25-2013
    Location
    near Philly, PA USA
    MS-Off Ver
    Excel 2019
    Posts
    178

    Re: Finding specific text in a cell with inexact results

    Dredwolf,
    I've attached a sample workbook with data for you to see what I have to work with.
    Thanks,
    Bob
    Attached Files Attached Files

  4. #4
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Finding specific text in a cell with inexact results

    Or maybe:
    =IF(ISERR(FIND("Professor",$W7)),"-",IF(ISERR(FIND("Assistant",$W7)),"X","-")) 'for Professor
    =IF(ISERR(FIND("Professor",$W7)),"-",IF(ISERR(FIND("Assistant",$W7)),"-","X")) 'for Assistant Professor

    Hope this helps

    Edit, just seen the workbook, give me a bit

  5. #5
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Finding specific text in a cell with inexact results

    See this:Bob33.sol1.xlsx

    The 2 formulas from last post seem to do the trick

    Edit-
    This would assume there are no assistant chairs who are aslo professor's though...
    Last edited by dredwolf; 03-04-2013 at 07:02 PM.

  6. #6
    Forum Contributor
    Join Date
    01-25-2013
    Location
    near Philly, PA USA
    MS-Off Ver
    Excel 2019
    Posts
    178

    Re: Finding specific text in a cell with inexact results

    Dredwolf,
    Nicely done! I hadn't thought of nesting them that way.
    Thank you,
    Bob

  7. #7
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Finding specific text in a cell with inexact results

    Modified:Bob33.sol1A.xlsx

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

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

    for assistant professor
    (note the ranges for the comparison are for the sample)

    Hope this helps

  8. #8
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Finding specific text in a cell with inexact results

    You are welcome
    I would use the second set though, just in case

  9. #9
    Forum Contributor
    Join Date
    09-27-2012
    Location
    Florida
    MS-Off Ver
    Excel XP to 2013
    Posts
    342

    Re: Finding specific text in a cell with inexact results

    You could also try this since you are using 2007 it will work as long as "Professor" and/or "Assistant" are the first words in the text.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  10. #10
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Finding specific text in a cell with inexact results

    @ Tank, as per the sample, they can be anywhere in a large amount of multiple titles, so it needs to check if the other is there (at least in the first case..)

  11. #11
    Forum Contributor
    Join Date
    09-27-2012
    Location
    Florida
    MS-Off Ver
    Excel XP to 2013
    Posts
    342

    Re: Finding specific text in a cell with inexact results

    dredwolf, you are correct. I was looking at the sample file and saw the titles as the first word in the first 6 lines and did not look further. I also did not see your post before I posted. Sorry for the confusion.

  12. #12
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Finding specific text in a cell with inexact results

    No Problem, just thought I'd point it out is all

  13. #13
    Forum Contributor
    Join Date
    01-25-2013
    Location
    near Philly, PA USA
    MS-Off Ver
    Excel 2019
    Posts
    178

    Re: Finding specific text in a cell with inexact results

    Thanks! The revisions are working.
    I did notice that these are case-sensitive; is there a formula where it would find both Professor and professor?

  14. #14
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Finding specific text in a cell with inexact results

    Change the 'FIND' to 'SEARCH', Search is not case sensitive

  15. #15
    Forum Contributor
    Join Date
    01-25-2013
    Location
    near Philly, PA USA
    MS-Off Ver
    Excel 2019
    Posts
    178

    Re: Finding specific text in a cell with inexact results

    Thanks Dred!

  16. #16
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Finding specific text in a cell with inexact results

    you are welcome

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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