+ Reply to Thread
Results 1 to 6 of 6

How to recognise text with " in it

  1. #1
    Registered User
    Join Date
    08-14-2019
    Location
    Tupelo, MS
    MS-Off Ver
    365
    Posts
    3

    How to recognise text with " in it

    I'm trying to use an if function to pull info from one cell and equal another name per se in another cell. I think the problem is, I'm already using a quotation mark, so it's not reading the function correctly. .

    I'm wanting to take the data that is in cell D5, (3/4" WOOD) and output 0.750.

    My formula is as follows.

    =IF(D5="3/4" WOOD",0.750)

    Is there anyway to make excel ignore the " behind the 3/4??

    Thanks in advance.
    Last edited by FDibbins; 08-14-2019 at 03:02 PM. Reason: Title changed.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    47,765

    Re: How to recognise text with " in it

    Hi, welcome to the forum

    (I changed your title to something more descriptive of your question, btw)

    Would you have only that instance if the text, or could you also have something like 1/4 " wood etc?
    Would it be feasible to just extract the 3/4 and convert it to numeric?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    08-14-2019
    Location
    Tupelo, MS
    MS-Off Ver
    365
    Posts
    3

    Re: How to recognise text with " in it

    Thank you very much!

    Yes, there would be other instances like 1/4" wood, 7/8" wood, etc. I know it has to be the " that's getting me, but I can't find a way around it.

  4. #4
    Valued Forum Contributor Root_'s Avatar
    Join Date
    07-29-2017
    Location
    _
    MS-Off Ver
    2010+
    Posts
    390

    Re: How to recognise text with " in it

    Try

    =IF(D5="3/4"" WOOD",0.750)

  5. #5
    Forum Expert Sambo kid's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    Office Professionsl Plus 2016- work; 2012 for Mac at home
    Posts
    5,375

    Re: How to recognise text with " in it

    I did it with something like this =IF(LEFT(D5,3)="3/4",0.75,"") but that would require either a list of lookups or individually doing each.

    using a vlookup against a table it would look like this... =VLOOKUP(LEFT(D5,4),E1:F10,2,FALSE)
    where the table of 3/4" in E1 and 0.75 is in F1 and others are in additional rows.

    EDIT2: AND you have to have the inch indicator in the cell otherwise excel might change the 3/4 to a date.
    Last edited by Sambo kid; 08-14-2019 at 03:27 PM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam C

  6. #6
    Registered User
    Join Date
    08-14-2019
    Location
    Tupelo, MS
    MS-Off Ver
    365
    Posts
    3

    Re: How to recognise text with " in it

    Quote Originally Posted by Root_ View Post
    Try

    =IF(D5="3/4"" WOOD",0.750)
    That got it! Thanks for the help guys!

+ 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