+ Reply to Thread
Results 1 to 12 of 12

How to remove first 8 characters (including space) in a string

  1. #1
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    How to remove first 8 characters (including space) in a string

    Dear Forum expert,

    Kindly help me with VBA code for "How to remove first 8 characters (including space) from a string in the entire column of a work sheet.

    Example:

    Column A - AN02001 Dr. BCDG Hospital, Texas

    Result in Column A as - Dr. BCDG Hospital, Texas

    Note: I want to do it for the entire column.

    Regards

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: How to remove first 8 characters (including space) in a string

    Try this formula..

    =RIGHT(A1,LEN(A1)-8)

    Do you still need a VBA code?
    Cheers!
    Deep Dave

  3. #3
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: How to remove first 8 characters (including space) in a string

    Dear Expert,

    Yes, I need a VBA code. Please do the needful.

    Regards

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: How to remove first 8 characters (including space) in a string

    Here is the VBA Code. This is assuming there is no data in Column B

    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: How to remove first 8 characters (including space) in a string

    May be
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: How to remove first 8 characters (including space) in a string

    Try
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: How to remove first 8 characters (including space) in a string

    Dear expert,

    Thanks for your code. it shows runtime error:5 - Invalid procedure call or argument.

    Actually the data in Column C - AN02001 Dr. BCDG Hospital, Texas and Result in Column C should be as - Dr. BCDG Hospital, Texas.

    Regards

  8. #8
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: How to remove first 8 characters (including space) in a string

    Try
    Please Login or Register  to view this content.

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: How to remove first 8 characters (including space) in a string

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: How to remove first 8 characters (including space) in a string

    Quote Originally Posted by jindon View Post
    Try
    Please Login or Register  to view this content.
    Dear Jindon,

    Wow.... works perfect. Thanks a lot.

    Regards

  11. #11
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: How to remove first 8 characters (including space) in a string

    Dear Need for excel and Mohadin,

    Thanks for your time and support for my requirement.

    Regards

  12. #12
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: How to remove first 8 characters (including space) in a string

    One more option
    Please Login or Register  to view this content.

+ 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. [SOLVED] VBA to remove text between to character (including those characters)
    By Hecky83150 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 03-13-2020, 12:41 PM
  2. [SOLVED] VBA, remove all characters within a string, except numerical characters and full stops
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-25-2015, 09:24 PM
  3. Replies: 7
    Last Post: 07-25-2014, 08:21 AM
  4. Remove all characters before space in line
    By gartie in forum Excel General
    Replies: 9
    Last Post: 08-29-2012, 05:52 PM
  5. Remove all characters after space
    By vsantoro in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-02-2010, 04:46 PM
  6. Remove varying amounts of space characters
    By Access Joe in forum Excel General
    Replies: 4
    Last Post: 01-13-2006, 06:30 PM
  7. erase all space characters into string
    By Maileen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-16-2005, 06:06 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