+ Reply to Thread
Results 1 to 12 of 12

multiple find and replace macro (clased file)

  1. #1
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    multiple find and replace macro (clased file)

    Please Login or Register  to view this content.
    Hi
    I'm very much like the format of the code above.
    I would like a new code with the same format.
    Change Find new code files will be closed.
    (Files in a folder)
    I'm sorry for the English.
    I am writing with Google translate.
    Last edited by pixel34; 06-10-2013 at 09:28 PM.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: multiple find and replace macro (clased file)

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: multiple find and replace macro (clased file)

    Hi patel45
    You are very kind.
    Thank you.
    Please look at my example file.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: multiple find and replace macro (clased file)

    I'm sorry but I did not understand your goal

  5. #5
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: multiple find and replace macro (clased file)

    Hi patel45

    I would like added to the following code.
    The following code is making a single change.
    I would like to make changes at the same time 8 or 10.


    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: multiple find and replace macro (clased file)

    ..................
    double posts
    Last edited by pixel34; 06-09-2013 at 07:50 AM. Reason: double posts

  7. #7
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,199

    Re: multiple find and replace macro (clased file)

    Hi, pixel34,

    maybe like this (I changed the range from the whole sheet to the range mentioned in the opening post), code is untested:
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  8. #8
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: multiple find and replace macro (clased file)

    Hi HaHoBe,
    Great find and replace operation.
    Thank you very much.

    I want to get a great macro.
    Find and replace if it was successful. >>> Column H cell "x"
    Find and replace if it is not successful. >>> Column H cell " " (empty)

  9. #9
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,199

    Re: multiple find and replace macro (clased file)

    Hi, pixel34,

    when you use Replace as a normal function you get a feedback of how many times the replacement has taken place. If you use the command via VBA use must maybe take WorksheetFunction.CountIf before replacing and after in order to decide whether the action was successful. And since you replace in a lot of files: any single file in a new column, any single sheet of each workbook?

    Ciao,
    Holger

  10. #10
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: multiple find and replace macro (clased file)

    Hi Dear HaHoBe,
    applied to the macro in the workbook page. So the "Change Page"

    I do not want the action to closed files.

    Edit: I is concerned. Entries she understood exactly.
    We hope that in the sample can be determined.
    Attached Files Attached Files
    Last edited by pixel34; 06-09-2013 at 05:17 PM.

  11. #11
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,199

    Re: multiple find and replace macro (clased file)

    Hi, pixel34,

    sorry but as I donīt know the structure of the files where the replacement shall take place I find it hard to predict whether any change is successfull or not. And again: what shold be indicated: if any one change was successfull in any worksheet or if the replacement was successfull in all worksheets in all workbooks?

    I do not want the action to closed files.
    The line for closing is
    Please Login or Register  to view this content.
    If you add ' or the text REM in front of that line VBA will mark it as a comment and it will be passed. You may delete that line if you feel like (again: I donīt know how many files are in the given folder).

    Ciao,
    Holger

  12. #12
    Registered User
    Join Date
    01-25-2013
    Location
    tr
    MS-Off Ver
    2007
    Posts
    75

    Re: multiple find and replace macro (clased file)

    Hi HaHoBe,
    I think I got better.
    Thank you very much.

+ 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