Results 1 to 11 of 11

Multiple cells selected by user, than remove last character

Threaded View

  1. #1
    Registered User
    Join Date
    08-06-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    91

    Multiple cells selected by user, than remove last character

    Hi!

    I would like to make a macro that remove the last character of all cells selected from my user IF they meet a certain condition.. let say they end by L.

    selectionrange.png

    Something like:

    If Right(Sheets("NAME_OF_SHEET").Selection), 1) = "L" Then
    value = Left(Sheets("NAME_OF_SHEET").Selection, Len(Sheets("NAME_OF_SHEET").Selection) - 1)
    Else
    value = Sheets(Selection).Selection
    End If
    How can I do this ?

    Thanks,
    JP
    Last edited by JPGraphX; 06-06-2014 at 10:47 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Need separate codes to remove first and last character from cells
    By alchavar in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-01-2013, 04:48 PM
  2. how to remove a character from the middle of text on all cells
    By webuxer in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-30-2013, 06:01 PM
  3. Replies: 3
    Last Post: 11-20-2012, 10:03 PM
  4. VBA to select user multiple selected ranges
    By longbow007 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2010, 06:07 PM
  5. Remove character from excel cells
    By VMAMedia.com in forum Excel General
    Replies: 1
    Last Post: 01-21-2007, 10:37 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