+ Reply to Thread
Results 1 to 7 of 7

Quotation Marks within Quotation Marks

  1. #1
    Forum Contributor
    Join Date
    07-21-2018
    Location
    London, England
    MS-Off Ver
    Excel for Mac Version 16.15
    Posts
    117

    Quotation Marks within Quotation Marks

    Hello!

    I need some help with including quotation marks within quotation marks in my custom sort code (below).

    Please Login or Register  to view this content.
    How do I include 28", 30", 32", 34" in my custom sort without getting an error?

    Any help would be appreciated!

    Thank you!

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Quotation Marks within Quotation Marks

    try - caveat: untested

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-21-2018
    Location
    London, England
    MS-Off Ver
    Excel for Mac Version 16.15
    Posts
    117

    Re: Quotation Marks within Quotation Marks

    Thank you for your reply! I'm not getting an error on the code now but it's not sorting in the correct order (image below).

    Do you know why this might be?

    Attachment 619633

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Quotation Marks within Quotation Marks

    Why are you duplicating threads with essentially the same question. With 91 posts you should know better.

    Your other post has been closed.

    The data is sorting correctly. The Size is the last key to be sorted. Maybe you should sort by Size before by SKU, or even earlier depending on the precise order.

    But I question why you are adding sort keys every time with the macro. In fact every time you run the macro you just add another set of sort keys which repeat the first set. This is wasteful of resources.

    Why can't you manually sort the data as you want and then just have the macro perform the sort without any of the .AddKey stuff.

    If you do want to add keys for some strange reason then at least have the macro first delete what's there.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Forum Contributor
    Join Date
    07-21-2018
    Location
    London, England
    MS-Off Ver
    Excel for Mac Version 16.15
    Posts
    117

    Re: Quotation Marks within Quotation Marks

    Hi Richard,

    I'm not sure why you closed my other thread as this isn't a duplicate. My other thread related to data not sorting correctly with my custom sort. This thread was a question I had about how to use quotation marks in code so I thought they were different subjects? Forgive me if I'm wrong - I'm a vba novice and pretty new to this forum/not a frequent user.

    Your reply here actually relates to my other post really. My data wasn't in fact sorting correctly. As shown in the image attached to that post, the data was almost identical (same Brand, Gender, SKU) except from the Size and as Size is the last thing to be sorted it should appear in the order laid out in my custom sort. Rorya was able to fix this problem for me with his reply and it works as expected now.

    I'm not entirely sure what you mean about the keys thing - I'm pretty new to VBA and have just followed instructions from various website etc. But thank you for your help. Problem solved
    Last edited by benjhardie; 04-11-2019 at 06:46 AM.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Quotation Marks within Quotation Marks

    Your other thread and this one both mentioned that the sort was not what you expected, and they both referenced the same bit of code procedure.

    I think it reasonable to assume that those who are already familiar with your first request are more than likely to be able to chip in with any addition to your request and you are therefore better served by keeping everything together.

  7. #7
    Forum Contributor
    Join Date
    07-21-2018
    Location
    London, England
    MS-Off Ver
    Excel for Mac Version 16.15
    Posts
    117

    Re: Quotation Marks within Quotation Marks

    Okay

+ 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. Exporting quotation marks as is
    By pradhan in forum Excel General
    Replies: 0
    Last Post: 04-16-2012, 08:18 PM
  2. Quotation Marks Getting in the Way
    By Vladamir in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-12-2012, 06:50 PM
  3. Quotation Marks?
    By LinearChaos in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-25-2006, 05:37 PM
  4. without quotation marks?
    By jfazz in forum Excel General
    Replies: 1
    Last Post: 03-02-2006, 12:45 PM
  5. Quotation Marks - When and What??
    By heski in forum Excel General
    Replies: 2
    Last Post: 02-07-2006, 08:45 AM
  6. quotation marks
    By JohnF in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-05-2006, 05:35 PM
  7. [SOLVED] quotation marks
    By Hippy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-04-2005, 07:10 PM
  8. Quotation Marks
    By kosecki in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-31-2005, 10:05 AM

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