+ Reply to Thread
Results 1 to 5 of 5

Text strings separated with "/", ",", "-" or "&"

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    London
    MS-Off Ver
    Excel 2003 Excel 2010
    Posts
    189

    Text strings separated with "/", ",", "-" or "&"

    Hello all, can I ask a vba question? I have a column A which contains all kinds of text strings. I noticed that a lot of them are separated by , / & or -.

    North, Central, South Europe
    North / Central / South Europe
    North & Central & South Europe
    North - Central - South Europe

    I need a UDF function to check it. If the text string contains no special characters (, / & -), then return the original cell value. Otherwise, return the far right text string separated by any of the 4 characters. For example, the North / Central / South Europe will be returned as South Europe.

    I'm very new to VBA so sorry for my trouble.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Text strings separated with "/", ",", "-" or "&"

    Please Login or Register  to view this content.

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Text strings separated with "/", ",", "-" or "&"

    Hi Alice,

    Try this code in the attached:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Contributor
    Join Date
    01-16-2014
    Location
    London
    MS-Off Ver
    Excel 2003 Excel 2010
    Posts
    189

    Re: Text strings separated with "/", ",", "-" or "&"

    Great thanks. It is really interesting. Well learned

  5. #5
    Forum Contributor
    Join Date
    01-16-2014
    Location
    London
    MS-Off Ver
    Excel 2003 Excel 2010
    Posts
    189

    Re: Text strings separated with "/", ",", "-" or "&"

    THANK both! Very appreciate your help.

+ 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: 1
    Last Post: 08-15-2014, 06:00 AM
  2. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  3. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  4. How can i copy value from "HTMLText"(EMBED("Forms.HTML:Text","")),using Macro
    By andrewyang in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2010, 12:47 AM
  5. Replies: 7
    Last Post: 05-13-2006, 05:02 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