+ Reply to Thread
Results 1 to 5 of 5

Formula to remove brackets, full stops, commas and spaces

  1. #1
    Registered User
    Join Date
    07-26-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    3

    Formula to remove brackets, full stops, commas and spaces

    Hi there,

    The formula I'm using to remove commas, spaces and full stops is working I just can't figure out what to add to it to remove brackets, here's the formula below:

    =IF(OR(RIGHT(TRIM(F227),1)={",","."}),LEFT(TRIM(F227),LEN(TRIM(F227))-1),TRIM(F227))

    So if I have "(Mrs)," it returns "(Mrs)" and I really don't want the brackets.

    Hoping that somebody could help...

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Formula to remove brackets, full stops, commas and spaces

    hi MikeNificent, welcome to the forum. your current formula is saying that if EITHER of the symbols (comma or full stop) appears, it will pick remove one letter from the right. is that what you need? because if comma or full stop appears on the left, the formula will not remove it. the same thing is happening when you have brackets. so to remove all commas, full stops & brackets, try:
    Please Login or Register  to view this content.
    to still follow the theory i mentioned above but remove brackets, try:
    Please Login or Register  to view this content.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    07-26-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Formula to remove brackets, full stops, commas and spaces

    Hi Benishiryo,

    I almost cried from happiness when I pasted your formula in and it worked, thanks allot!!

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Formula to remove brackets, full stops, commas and spaces

    @ MikeNificent

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  5. #5
    Registered User
    Join Date
    07-26-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Formula to remove brackets, full stops, commas and spaces

    @ Cutter, oh I see sorry, my apologies for the oversight will definitely make a point of that.

+ 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