+ Reply to Thread
Results 1 to 7 of 7

Remove preceeding apostrophe without removing preceeding 0s

  1. #1
    Registered User
    Join Date
    10-02-2013
    Location
    houston
    MS-Off Ver
    Excel 2010
    Posts
    4

    Remove preceeding apostrophe without removing preceeding 0s

    I have a column of unique ID numbers that are preceeded by an apostrophe and formatted as either text or as a general number. I am trying to match this data column with another column in a different tab in the same workbook. I am having trouble with the too tabs matching because one column of data has the ' and other column does not. How can I remove the ' without removing the leading 0's it works when I retype the data- only then does the column match the other column in my indexMatch function.

    data:
    '008901
    '008902
    '008903
    '009901
    '010901
    '010902
    '011901
    '215236
    '542165

    All ID numbers are 6 digits. Text to column does not work because it removes the 0s. In the second column that I am trying to match the numbers with the ID numbers show the preceeding 0s but do not have the '

    Column 2
    111902
    181908
    061914
    140904
    187907
    150901
    028902
    077902


    thank you kindly! this may be wordy as it is my first post!

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Remove preceeding apostrophe without removing preceeding 0s

    they should match provided the leading 0 are in the cell as text and not as the result of formatting
    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Attached Files Attached Files
    Last edited by martindwilson; 10-02-2013 at 10:26 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    10-02-2013
    Location
    houston
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Remove preceeding apostrophe without removing preceeding 0s

    removeApostrophe.xlsxremoveApostrophe.xlsx

    Please see the two tabs. I would like to get the tab "Original" to have real results output from the formula in column B.

  4. #4
    Registered User
    Join Date
    10-02-2013
    Location
    houston
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Remove preceeding apostrophe without removing preceeding 0s

    Thank you for your reply. See attachment in post below.

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Remove preceeding apostrophe without removing preceeding 0s

    ah i dont know how you got that ' in there but
    =INDEX('Match With This'!$B$3:$B$15,MATCH(SUBSTITUTE(A3,"'",""),'Match With This'!$A$3:$A$15,0))
    works

  6. #6
    Registered User
    Join Date
    10-02-2013
    Location
    houston
    MS-Off Ver
    Excel 2010
    Posts
    4

    Thumbs up Re: Remove preceeding apostrophe without removing preceeding 0s

    Thank you! I also used a text to column reformatting the new column to a text instead of general and it worked as well. I prefer the formula way and am revising now!

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Remove preceeding apostrophe without removing preceeding 0s

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. Working with Preceeding Zeros
    By petevang in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-31-2013, 02:44 PM
  2. [SOLVED] Insert number new rows based on preceeding row. Populate them based on preceeding row.
    By Common Wealth in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-13-2013, 06:44 PM
  3. Removing preceeding and trailing characters
    By Spiritseeker in forum Excel General
    Replies: 2
    Last Post: 02-28-2009, 08:45 AM
  4. Removal of preceeding set of numbers
    By robbie1507 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-25-2007, 10:05 AM
  5. Force preceeding spaces
    By cottage6 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-14-2005, 12:06 PM

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