+ Reply to Thread
Results 1 to 2 of 2

VBA to Remove Last Occurrence of a Full Stop in a String

  1. #1
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2016
    Posts
    140

    VBA to Remove Last Occurrence of a Full Stop in a String

    Hello,
    I am trying to find the correct code to substitute the last occurrence of a full stop within a sting.
    When a user pastes a string into a cell, the VBA performs several checks for the cells sleeted, once of which is to replace the last full stop within the string.
    e.g. dongle.com would become dongle[.]com / dongle.co.uk would become dongle.co[.]uk / 999.999.999.999 would become 999.999.999[.]999

    I have found code and replaced the search criteria but it doesn't work
    Please Login or Register  to view this content.
    I am trying to use it in my VBA this way
    Please Login or Register  to view this content.
    For my testing, I am pasting the following;
    dongle.co.uk
    tongle.co.uk
    wongle.co.uk
    bongle.co.uk
    zongle.co.uk
    1.1.1.1

    I don't know if it matters but my data is within a table in Excel, not just normal cells.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: VBA to Remove Last Occurrence of a Full Stop in a String

    If you want to change the cells in the selection.

    Please Login or Register  to view this content.
    Last edited by davesexcel; 10-25-2023 at 08:51 AM.

+ 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. Replies: 4
    Last Post: 02-08-2016, 08:15 AM
  2. How can I stop the short menu appearing when I press the full stop key?
    By Sadieberg in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 06-06-2015, 07:43 AM
  3. Match Full String into Partial String
    By krishns in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-27-2015, 05:04 PM
  4. [SOLVED] VBA, remove all characters within a string, except numerical characters and full stops
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-25-2015, 09:24 PM
  5. [SOLVED] Need to add a full stop.....
    By Meger5 in forum Excel General
    Replies: 6
    Last Post: 03-28-2014, 01:09 PM
  6. Replies: 2
    Last Post: 03-19-2013, 06:13 AM
  7. Replacing Misspelled sub-string in varying full string
    By freerdj in forum Excel General
    Replies: 15
    Last Post: 08-28-2009, 08:00 PM

Tags for this Thread

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