+ Reply to Thread
Results 1 to 3 of 3

macro to delete all text after colons

  1. #1
    Registered User
    Join Date
    04-27-2007
    Posts
    6

    macro to delete all text after colons

    Hello everyone! I have what I hope is a simple request...

    I need a macro that finds all instances of ":", and deletes the colon along with all text after it within each cell. For example, if Column A reads:

    Please Login or Register  to view this content.
    ...then, after running the macro, it should read:

    Please Login or Register  to view this content.
    Your help is appreciated!

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444
    Hi,

    Are you sure you need a macro?

    Much easier like this,

    =LEFT(A1,(FIND(":",A1)-1))
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    04-27-2007
    Posts
    6
    Please ignore me, for I am an idiot. About two minutes after posting this, I smacked myself upside the head and ran a Find-Replace for ":*" and "[blank]". Mission accomplished. Thanks anyway.

+ 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