+ Reply to Thread
Results 1 to 5 of 5

Remove leading comma

  1. #1
    Registered User
    Join Date
    06-21-2010
    Location
    Suffolk, England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Remove leading comma

    I have some cells with a leading comma as the first character in a column.

    Is there a formula to detect if there is a comma as the first character in the cell, and if found remove it?

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: Remove leading comma

    Hi,

    Have you tried using Find/Replace, find comma, replace - leave it blank
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    06-21-2010
    Location
    Suffolk, England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Remove leading comma

    The trouble is the cells also include other commas that I want to leave in place.
    I only want to remove a leading comma if it exists, not all commas in the cell.

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: Remove leading comma

    Hi,

    Try this in B1 copied down

    =IF(ISERROR(IF(FIND(",",A1),MID(A1,2,100))),A1,IF(FIND(",",A1),MID(A1,2,100)))

    Addendum: The 100 allows for the number of characters in the sentence, if more increase it.
    Last edited by oldchippy; 06-21-2010 at 05:32 PM. Reason: Addendum

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Remove leading comma

    Or = MID(A1, (LEFT(A1)=",") + 1, LEN(A1))
    Entia non sunt multiplicanda sine necessitate

+ 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