+ 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
    5

    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 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    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
    5

    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
    484

    Re: How to recognise text with " in it

    Try

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

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,498

    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 Sam Capricci; 08-14-2019 at 03:27 PM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

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

    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