+ Reply to Thread
Results 1 to 13 of 13

Remove space before comma if exists

  1. #1
    Registered User
    Join Date
    06-16-2016
    Location
    audtralia
    MS-Off Ver
    13
    Posts
    11

    Remove space before comma if exists

    HI

    I need to remove the space before the , if it exists???

    The address are business addresses and not private!


    Cnr Junction Rd and Krystyna Ct , KARALEE QLD, 4306
    12 Edgar St , AUBURN NSW, 2144
    121 Shute Harbour Road , CANNONVALE QLD, 4802
    30 Brisbane Road , Gailes QLD, 4300
    272-274 Copperfield Drive , ROSEMEADOW NSW, 2560

    Thanks in Advance

  2. #2
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: Remove space before comma if exists

    Hi,
    Try this formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards,
    Stephen

    If you feel someone has helped you please thank them and click on the star on their post to add reputation.
    Please ensure that you use code tags where relevant, and mark solved threads as solved.
    Most of all please be respectful and understanding of others.

  3. #3
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Remove space before comma if exists

    Try this

    =SUBSTITUTE(A1," ,",",")
    Happy with my advice? Click on the * reputation button below

  4. #4
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: Remove space before comma if exists

    Quote Originally Posted by Crooza View Post
    Try this

    =SUBSTITUTE(A1," ,",",")
    Great minds think alike.....

  5. #5
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Remove space before comma if exists

    Yep. It was the obvious solution wasn't it

  6. #6
    Registered User
    Join Date
    06-16-2016
    Location
    audtralia
    MS-Off Ver
    13
    Posts
    11

    Re: Remove space before comma if exists

    Thanks guy....

    BUT!!!!! did not work!!!

    Output

    addresses-remove-comma.jpg

  7. #7
    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,939

    Re: Remove space before comma if exists

    Please upload a sample of your workbook, not a picture of your data. Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you
    Also, not all members can upload picture files (Company firewalls and stuff) - and, depending on what browser is being used, some pics dont even show up on the forum

    Your workbook should show a small desensitized example of the data you are working with and a manual mockup of the expected results.
    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

  8. #8
    Registered User
    Join Date
    06-16-2016
    Location
    audtralia
    MS-Off Ver
    13
    Posts
    11

    Re: Remove space before comma if exists

    Spreadsheet uploaded with same data

    thanks
    Attached Files Attached Files

  9. #9
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: Remove space before comma if exists

    Hi Wholly,

    Your data has 2 spaces before the comma so you can either use:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    or
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The second formula is better because it will fix up any cells where there is either 1 or 2 spaces before the comma

  10. #10
    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,939

    Re: Remove space before comma if exists

    And that s why it is almost always better to upload a sample workbook - noway that was visible in the pic (which many members cannot even see anway)

  11. #11
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: Remove space before comma if exists

    Quote Originally Posted by FDibbins View Post
    And that s why it is almost always better to upload a sample workbook - noway that was visible in the pic (which many members cannot even see anway)
    Hmm, yes.... and there was only single spaces in the original post!

  12. #12
    Registered User
    Join Date
    06-16-2016
    Location
    audtralia
    MS-Off Ver
    13
    Posts
    11

    Re: Remove space before comma if exists

    Thanks

    How sillu a simple space can make.

    Thank all very much

  13. #13
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,914

    Re: Remove space before comma if exists

    Or try this ...

    =SUBSTITUTE(TRIM(A2)," ,",",")

+ 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. Comma delimited numbers with space after comma
    By Cicada in forum Excel General
    Replies: 5
    Last Post: 04-23-2015, 09:32 AM
  2. [SOLVED] Convert space between first and last name to comma
    By Vaslo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-04-2014, 03:06 PM
  3. [SOLVED] Replace space to comma
    By rarementality in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-13-2014, 09:15 AM
  4. [SOLVED] QUICK HELP WITH removing space and comma
    By mecutemecute in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-17-2013, 09:35 AM
  5. Find and remove all text to the left of last comma (including comma) in a cell
    By Excelrookie_1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-05-2013, 08:47 AM
  6. [SOLVED] If Cell Starts with a Space, remove that space
    By Ocean Zhang in forum Excel General
    Replies: 2
    Last Post: 09-29-2012, 01:52 PM
  7. [SOLVED] Removing a space after a comma
    By DebbieK9 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 04-01-2005, 06: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