Consulting

Results 1 to 3 of 3

Thread: Solved: Remove UCase from string

  1. #1
    VBAX Regular
    Joined
    Nov 2005
    Posts
    30
    Location

    Solved: Remove UCase from string

    I have a string from which I'd like to remove four characters (starting from the right), but I'm not sure how to do it. Appreciate some guidance.

    [vba]Dim S As String
    Dim T As String
    S = Sheets("Sheet1").Range("A1")
    T = S ' and removing UCase(Right(S, 4)) from S[/vba]

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]
    Dim T As String
    Dim S As Long

    With Sheets("Sheet1").Range("A1")
    S = Len(.Value) - 4
    T = Left(.Value, S)
    End With
    [/vba]

  3. #3
    VBAX Regular
    Joined
    Nov 2005
    Posts
    30
    Location
    Yes, that did it. Many thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •