+ Reply to Thread
Results 1 to 3 of 3

Find/Replace VBA for a specific column

  1. #1
    Registered User
    Join Date
    02-26-2011
    Location
    Watertown, CT
    MS-Off Ver
    Excel 2003
    Posts
    12

    Find/Replace VBA for a specific column

    I want to run several find and replace commands. I'm not sure how to limit the scope of the command to a specific column.

    I tried this macro to replace all spaces in column A with the letter N but the command runs without making any changes.
    Please Login or Register  to view this content.
    Thanks so much!
    Last edited by boolean; 03-16-2011 at 12:58 AM. Reason: Added Code Tags

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: Find/Replace VBA for a specific column

    Hi boolean,

    Try repacing this line of code...

    Please Login or Register  to view this content.
    ...with this:

    Please Login or Register  to view this content.
    Also, don't forget to wrap all code in tags (as I've done).

    HTH

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Find/Replace VBA for a specific column

    Hello boolean,

    If you want to replace all spaces within the cell, you need to set the parameters this way...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ 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