+ Reply to Thread
Results 1 to 8 of 8

(SOLVED) Macro for editting cells

  1. #1
    Registered User
    Join Date
    01-13-2010
    Location
    Cadillac, MI
    MS-Off Ver
    Excel 2003
    Posts
    81

    (SOLVED) Macro for editting cells

    Could someone provide the code to do the following macro activity.
    I need to edit a cell, have the cursor go the very beginning of the cell and delete the first space, hit enter to accept and go down one cell.
    Thanks for any help
    Last edited by tdf2437; 11-12-2010 at 12:43 PM. Reason: solved

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro for editting cells

    Maybe:
    Please Login or Register  to view this content.

    Or if you're trying to clean up all the stray spaces before and after the string:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    07-07-2005
    Location
    England
    MS-Off Ver
    Office 2019 Enterprise
    Posts
    462

    Re: Macro for editting cells

    are you saying you want to delete the first space that it finds in the cell so..

    John Smith Barrymore

    would become

    JohnSmith Barrymore

  4. #4
    Registered User
    Join Date
    01-13-2010
    Location
    Cadillac, MI
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Macro for editting cells

    Quote Originally Posted by johncassell View Post
    are you saying you want to delete the first space that it finds in the cell so..

    John Smith Barrymore

    would become

    JohnSmith Barrymore
    My cells had started with a SPACE before the John Smith Barrymore name. So I want the cursor to go to the beginning of the cell and delete that SPACE. It has nothing to do with the SPACE in between first/middle/last name.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro for editting cells

    Did you try the suggestions in post #2?

  6. #6
    Forum Contributor
    Join Date
    07-07-2005
    Location
    England
    MS-Off Ver
    Office 2019 Enterprise
    Posts
    462

    Re: Macro for editting cells

    So I believe the first code from JBeaucaire is exactly what you are looking for.

  7. #7
    Registered User
    Join Date
    01-13-2010
    Location
    Cadillac, MI
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Macro for editting cells

    yes, it worked... thanks for the help!

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro for editting cells

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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