+ Reply to Thread
Results 1 to 11 of 11

Find and Replace only one instance.

  1. #1
    Registered User
    Join Date
    08-14-2018
    Location
    San Francisco
    MS-Off Ver
    365 Business
    Posts
    6

    Find and Replace only one instance.

    Hello I am trying to replace only one instance of a value in a sheet which is always 8 cells over from another value. (I have hundreds of these sheets so I have some code for that loop task).

    Trick is there are multiple entries of each value and it is not always in the same cell of each sheet but it is always a relative 8 cells over from the first instance of another value.
    I imagine it would go like this:


    Go to cell A1
    Search by column until you find the first "9999" in the sheet.
    Now move 8 columns over, (same row) and replace whatever is in that cell with "8888"
    Stop (dont look for any more "9999"s)
    Save/close file


    Trickier than I can handle Thx as always!

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,097

    Re: Find and Replace only one instance.

    Is the job to be done in several sheets ?
    IS there always 8 columns over the target cell else what to do ?
    Can you send a short excel sample to avoid bad understanding
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,097

    Re: Find and Replace only one instance.

    Is it what you need ???
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,097

    Re: Find and Replace only one instance.

    My understanding was not correct I think, here a remake
    Same job for all sheets
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-14-2018
    Location
    San Francisco
    MS-Off Ver
    365 Business
    Posts
    6

    Re: Find and Replace only one instance.

    No only one sheet per workbook but 100s of workbooks

    FandR1.JPG

  6. #6
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,097

    Re: Find and Replace only one instance.

    Where are all workbooks?
    Only a particular sheet to treat per workbook
    Last edited by PCI; 09-24-2018 at 04:27 PM.

  7. #7
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,097

    Re: Find and Replace only one instance.

    Where are all workbooks?
    Only a particular sheet to treat per workbook

  8. #8
    Registered User
    Join Date
    08-14-2018
    Location
    San Francisco
    MS-Off Ver
    365 Business
    Posts
    6

    Re: Find and Replace only one instance.

    Hello this seems to work unless I change the 9999 and 8888 examples to my actual values of "1-415-506-3232" and "Remove"

  9. #9
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,097

    Re: Find and Replace only one instance.

    Please send an Excel sample to show when it fails
    See my test file attached
    Attached Files Attached Files
    Last edited by PCI; 09-24-2018 at 04:39 PM.

  10. #10
    Registered User
    Join Date
    08-14-2018
    Location
    San Francisco
    MS-Off Ver
    365 Business
    Posts
    6

    Re: Find and Replace only one instance.

    Was just the quotes I guess! Thanks so much!

  11. #11
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,097

    Re: Find and Replace only one instance.

    Was just the quotes I guess
    Yes usual error
    But the story of the 100 workbooks to treat is not solved for me ...no ?

+ 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. Find duplicates in column B, keep value from first instance in A, and replace B:H
    By votekinky06 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-31-2014, 04:04 PM
  2. [SOLVED] Find and replace second instance
    By ammartino44 in forum Excel General
    Replies: 3
    Last Post: 01-17-2014, 03:39 PM
  3. Replies: 3
    Last Post: 10-08-2013, 09:46 AM
  4. [SOLVED] Find and Replace first instance of word Only
    By ScabbyDog in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-18-2013, 01:14 PM
  5. [SOLVED] find and replace for instance
    By nicktater in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2013, 04:42 PM
  6. [SOLVED] Lookup Table to Find/Replace Every Instance of a String (2/2)
    By Baghel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-04-2013, 05:49 AM
  7. Replies: 12
    Last Post: 12-31-2012, 04:13 AM

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