+ Reply to Thread
Results 1 to 7 of 7

Removing text

  1. #1
    Registered User
    Join Date
    04-11-2007
    Posts
    12

    Removing text

    Hi. I have a column that it populated with "JoeBob.xls". I'm looking for the best way to remove the".xls" from the string so that the final variable returns "JoeBob"

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    Select the column then Data > text to Columns > delimiter > other and enter a .

    Then deleted the columns with xls

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    04-11-2007
    Posts
    12
    I'm trying to do this in the macro code itself. so that strOne="JoeBob.xls" and strTwo="JoeBob" and I still can use both variables. Ideally, I need to remove the last four charcters from the string.

  4. #4
    Registered User
    Join Date
    01-09-2007
    Posts
    59
    Please Login or Register  to view this content.
    ska

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Prehaps this. Select your range and run

    Please Login or Register  to view this content.
    VBA Noob

  6. #6
    Registered User
    Join Date
    04-11-2007
    Posts
    12
    Thank you very much! This forum is very helpful.

  7. #7
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Glad you found a solution

    Thx for the feedback

    VBA Noob

+ 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