+ Reply to Thread
Results 1 to 10 of 10

Quotation mark?

  1. #1
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,163

    Quotation mark?

    How do you find if the last character in a string is a quotation mark?
    Please Login or Register  to view this content.
    If I enter this as above it will not work. I have a unique case that many cells will have a quotation mark as the last character, I can not prevent this but I do need to capture the cell address and do some code.

    Any help is appreociated!
    Regards

    Rick
    Win10, Office 365

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Try
    Please Login or Register  to view this content.
    Last edited by shg; 05-08-2008 at 05:46 PM.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    Don't forget to specify the number of characters

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,163
    Oh hell, that was too easy!

    Thank you!

  5. #5
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,163
    Excel 2007 simply will not except this format
    Please Login or Register  to view this content.
    But it does when formatted as
    Please Login or Register  to view this content.
    So, how do I replace the quotation mark, this will not work.
    Please Login or Register  to view this content.
    I have to find the quotation mark, place the text value of the cell in a variable, remove the quotation mark and concatenate with another cell. I have it all less removing that darn quotation mark.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Don't forget to specify the number of characters
    Both the VBA and worksheet versions default to 1

    So, how do I replace the quotation mark
    You mean remove a trailing quote if there is one? Maybe
    Please Login or Register  to view this content.
    Last edited by shg; 05-08-2008 at 06:48 PM.

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    That will teach me to test code in the immediate window only!

    You need 4 quotes in any version.
    Please Login or Register  to view this content.
    The argument is optional in worksheet function but not VBA

  8. #8
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,163
    Thank you, why can't help just state that?

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Quote Originally Posted by Andy
    optional in worksheet function but not VBA
    Quite correct, my bad.

  10. #10
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,163
    For those who wonder what I am doing, here is the bit of code.
    Please Login or Register  to view this content.
    Thanks to all for the help!

+ 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