+ Reply to Thread
Results 1 to 5 of 5

Replace option acting strangely

  1. #1
    Registered User
    Join Date
    08-23-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    22

    Angry Replace option acting strangely

    Hi

    I am running VBA which looks at a value in a column and where it finds it in another column, replaces it with a determined value

    However, it seems to be replacing it everywhere it finds it, not just in the selected column !!

    Really strange

    Any assistance, greatl appreciated

    TC
    Please Login or Register  to view this content.
    Last edited by tconnell1965; 11-25-2013 at 09:55 AM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Puzzling query

    try replacing

    Please Login or Register  to view this content.
    with

    Please Login or Register  to view this content.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Puzzling query

    You have this:

    Please Login or Register  to view this content.

    So, you select a range but then do the replacement on "Cells" ... hence you change the whole worksheet. Change "Cells" to "Selection".

    Or, better:

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Puzzling query

    Oh, forgot ... please change our thread title to conform to forum rules. Thanks

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Replace option acting strangely

    You're welcome. Thanks for the rep.

+ 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. Puzzling grey rectangle
    By norgro in forum Excel General
    Replies: 10
    Last Post: 12-22-2012, 02:51 AM
  2. Simple Operation Turned Puzzling
    By cheiss8078 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-05-2007, 02:19 PM
  3. Sum help this is puzzling???????????
    By scott in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-01-2006, 02:55 PM
  4. [SOLVED] Puzzling Format Questions
    By Kevin H. Stecyk in forum Excel General
    Replies: 3
    Last Post: 05-17-2005, 07:06 AM
  5. [SOLVED] Puzzling Memory Error !
    By Donna in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-05-2005, 11:06 PM

Tags for this Thread

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