+ Reply to Thread
Results 1 to 14 of 14

Replacing certain characters

  1. #1
    Registered User
    Join Date
    08-12-2018
    Location
    Wisconsin
    MS-Off Ver
    2010
    Posts
    10

    Replacing certain characters

    I have a .csv that I need to change certain characters in and was wondering if there is an easy way to accomplish this? The data in the column I need to change currently looks like this ::[ab1]N162:0/10 and I need to change it to ::[ab1]N162[0].10. Is there a fast way to automate this change?

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Replacing certain characters

    Well, based on the sole example given:

    =SUBSTITUTE(A1,":0/10","[0].10")

    But I’ll bet there’s more to it than that, so There are instructions at the top of the page explaining how to Create and attach a sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    08-12-2018
    Location
    Wisconsin
    MS-Off Ver
    2010
    Posts
    10

    Re: Replacing certain characters

    You are correct, there are several hundred rows in the column that all need to be corrected. Hopefully the sample has attached. It is column W that has the info I need to convert.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,831

    Re: Replacing certain characters

    Yes, but what are THE RULES to do the conversion? Is it that:
    1. The 3rd colon should be changed to a left bracket - [
    2. Then the forward slash after that needs to be changed to a right bracket and decimal point - ].

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Replacing certain characters

    What to do with these data?
    Attached Images Attached Images
    Quang PT

  6. #6
    Registered User
    Join Date
    08-12-2018
    Location
    Wisconsin
    MS-Off Ver
    2010
    Posts
    10

    Re: Replacing certain characters

    Quote Originally Posted by Gregb11 View Post
    Yes, but what are THE RULES to do the conversion? Is it that:
    1. The 3rd colon should be changed to a left bracket - [
    2. Then the forward slash after that needs to be changed to a right bracket and decimal point - ].
    Yes, that is exactly what needs to take place. Just the 3rd : and the / get replaced by [ and ]. respectively.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Replacing certain characters

    In X6 copied down:

    =SUBSTITUTE(SUBSTITUTE(W6,":","[",3),"/","]")

    You need to address the query in post #5. This may deal with it:

    =SUBSTITUTE(SUBSTITUTE(W6,":","[",3),"/","]")&IFERROR(FIND("/",W6),"]")
    Attached Files Attached Files
    Last edited by AliGW; 08-05-2020 at 09:37 AM.

  8. #8
    Registered User
    Join Date
    08-12-2018
    Location
    Wisconsin
    MS-Off Ver
    2010
    Posts
    10

    Re: Replacing certain characters

    Thank you. I can't see the image posted in post #5 for some reason. It just says there is an image attached but no actual image.
    Last edited by AliGW; 08-05-2020 at 09:56 AM. Reason: Please don't quote unnecessarily!

  9. #9
    Registered User
    Join Date
    08-12-2018
    Location
    Wisconsin
    MS-Off Ver
    2010
    Posts
    10

    Re: Replacing certain characters

    Quote Originally Posted by bebo021999 View Post
    What to do with these data?
    For some reason I cannot see the attachment to determine what data you are referring to

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Replacing certain characters

    It refers to row 253 onwards, which I believe I've dealt with.

  11. #11
    Registered User
    Join Date
    08-12-2018
    Location
    Wisconsin
    MS-Off Ver
    2010
    Posts
    10

    Re: Replacing certain characters

    Gotcha. Those simply remove the : and bracket the number after the colon. So instead of N100:163 it would become N100[163]

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Replacing certain characters

    Yes, that's what I guessed. Have you looked at my solutions and the attachment? Is it what you want?

    If so, if that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  13. #13
    Registered User
    Join Date
    08-12-2018
    Location
    Wisconsin
    MS-Off Ver
    2010
    Posts
    10

    Re: Replacing certain characters

    Yes, it works perfectly for me. Thank you very much!

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Replacing certain characters

    No problem.

+ 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. Excel 2007 : Replacing 2+ consecutive characters
    By PennyKat in forum Excel General
    Replies: 6
    Last Post: 12-14-2011, 07:04 PM
  2. Macro for Replacing Characters
    By jones1000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-02-2011, 04:17 PM
  3. Replacing characters partially
    By Kb24 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-23-2009, 07:03 AM
  4. Replacing Characters
    By tomyknoker in forum Excel General
    Replies: 4
    Last Post: 09-26-2007, 01:56 AM
  5. [SOLVED] Replacing ascii characters
    By HappyCamper in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-08-2006, 03:10 PM
  6. [SOLVED] Replacing specific characters
    By Trey in forum Excel General
    Replies: 3
    Last Post: 01-20-2006, 08:00 PM
  7. Replacing characters
    By Phil Floyd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-29-2005, 09:05 AM
  8. [SOLVED] Replacing characters
    By OhhAhh in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-03-2005, 09: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