+ Reply to Thread
Results 1 to 9 of 9

How do I remove apostrophes (') in seemingly empty cells?

  1. #1
    Registered User
    Join Date
    01-08-2015
    Location
    Durbanville, South Africa
    MS-Off Ver
    MS 2010
    Posts
    8

    Question How do I remove apostrophes (') in seemingly empty cells?

    Hi u'all ...

    Synopsis of my problem: when I export a report from Pastel to Excel, Pastel puts apostrophes as placeholders in certain cells so that the report on Excel looks like it would had you printed it out.

    These apostrophes causes problems with some of my formulas. I have overcome the problem by saving the exported file as a csv and then, after reopening it, saving as a xlsx. With short files, I just copy to Word and copy back to Excel, un-wrap the text and it's done.

    I have now attached the file. The 1st sheet is the catastrophe and the 2nd the various codes that I've tried. I've also copied as values to another sheet, multiplied by 1, 0 and a blank cell, amongst others I don't recall now. These work with the text and numbers prefixed with apostrophes but not the empty cells.


    (Thank you to the kind person who took the time to send me a message about shortening this post. If you want to read the hooplah I wrote first, it's below.)

    Thanks all

    test - apostrophe.xlsx

    ----------------------------------------------------------------
    ORIGINAL POST - VERBOSE & VERBIAGE:
    I've just joined this forum, having scoured the net for days 'n days for an answer to my problem. For the moment I have overcome my problem by saving as a csv and, after reopening, saving as a xlsx.

    My problem is that, when sending info from Pastel to Excel, Pastel sends apostrophes as placeholders so that the Excel sheet resembles the printout (since you are effectively "printing" to Excel instead of to a pdf or printer). As it happens, it also puts these apostrophes in front of anything that is not a number, for instance an order number which is SO245 gets one but 53642 does not. This does not really bother me. My debit and credit columns are my main problem. When there is a debit value, it's okay but when it's a credit value, the debit is a empty cell, which is not so empty.

    Don't get me wrong, being able to export to Excel is awesome but then, when you have several pages of rows and columns, "ctrl click, delete" becomes a long, brainless, time consuming, mind numbing bind. I'm clearly wanting to use the figures and these "empty" cells are not empty, resulting in errors when it becomes part of a formula. You'd think MS would have done something about this by now. (When you search for the constants, these empty cells are chosen and searching for blanks they are not ... very annoying)

    There are many brilliant suggestions on the internet, some from MS (e.g. Ctrl H, find ~' ... ) but this does not work for the supposedly empty cells. As a matter of fact, one solution removed the pesky apostrophe and STILL the cell was not blank until I pressed delete! Every solution I've found (+- 15) made my heart sing with joy but the songs deteriorated from full on, head banging, heavy metal to heart wrenching, wrist gnawing, break up ballads. Very very sad!

    Anyhoo, the "saving as" works for the short term with both the text, numbers as well as the less than blank cells, specifically when you're dealing with huge sheets. With smaller sheets, copy/paste to Word and back also does the trick, once you "un-wrap text" things.

    So, there you have it. Does anyone have any earth shattering, mind blowing solutions they can share? I'm using MS 2010 by the way and am not picky as to the elegance of the solution, whether it be macro/VBA, copy/paste, multiply this with that ... just as long as it's fast(ish) and not "ctrl clicking".

    Thanking you from the deepest recesses of my ever Excel loving heart

    Till later then
    ~T~
    Last edited by tinavh; 01-09-2015 at 04:00 AM. Reason: I'm apparently verbose and verbiage

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: How do I remove apostrophes (') in seemingly empty cells?

    Try this rather small macro:

    Please Login or Register  to view this content.
    Last edited by Jakobshavn; 01-08-2015 at 11:02 AM.
    Gary's Student

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: How do I remove apostrophes (') in seemingly empty cells?

    Suggest you post a sample workbook so that people have something to play with.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    01-08-2015
    Location
    Durbanville, South Africa
    MS-Off Ver
    MS 2010
    Posts
    8

    Re: How do I remove apostrophes (') in seemingly empty cells?

    Thanks Jakobshavn, I shall try this in a while and let you know.

  5. #5
    Registered User
    Join Date
    01-08-2015
    Location
    Durbanville, South Africa
    MS-Off Ver
    MS 2010
    Posts
    8

    Re: How do I remove apostrophes (') in seemingly empty cells?

    Hi Trevor. I've attached it now. Thanks for asking.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: How do I remove apostrophes (') in seemingly empty cells?

    Thanks. Jakobshavn's code seems to work very effectively. I can't offer a better alternative. A global replace with a tilda (~) doesn't seem to work ... "Excel found no data", etc.

    Have you tried the code?

    Regards, TMS

  7. #7
    Registered User
    Join Date
    01-08-2015
    Location
    Durbanville, South Africa
    MS-Off Ver
    MS 2010
    Posts
    8

    Re: How do I remove apostrophes (') in seemingly empty cells?

    Just ran it now, Jakobshavn's code worked and cleared my whole file! I am so chuffed now. Thanks TMS for helping as well. You guys rock!

  8. #8
    Registered User
    Join Date
    01-08-2015
    Location
    Durbanville, South Africa
    MS-Off Ver
    MS 2010
    Posts
    8

    Re: How do I remove apostrophes (') in seemingly empty cells?

    Jakobshavn, you are AWESOME!!! Thank you so much. That code is gold!

    Thanks a ton, seriously!

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: How do I remove apostrophes (') in seemingly empty cells?

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. [SOLVED] how to remove empty cells
    By Reside in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-08-2014, 09:39 AM
  2. [SOLVED] Remove Empty Cells........
    By Richard Fitzinya in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 03-26-2013, 09:25 PM
  3. Remove rows if certain cells are empty
    By VBisgreat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-16-2009, 04:21 PM
  4. Remove empty cells
    By wei82 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-25-2007, 10:21 AM
  5. [SOLVED] How do I remove leading apostrophes in Excel?
    By Nino in forum Excel General
    Replies: 8
    Last Post: 12-13-2005, 08:20 AM

Tags for this Thread

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