Hi All,
till now, i am using this macro
<code style="margin: 0px; padding: 0px; font-style: inherit;"> Selection.Replace What:="SOMETHING", Replacement:="Something", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:="SOMEthing", Replacement:="Something", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:="SOMething", Replacement:="Something", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False</code></pre>
i have these replaces very, very much after a time and it is very confusing, because i dont have very good control over same words etc.
You know, the replaces needs some logic so i have made "categories" of replaces. But now i d like to move on and question you if there is some better solution, in which i will be more able to read the code and know where i have to put some new replace strings.
Here is the best way i can imagine to work with this find replace macro
I think the best choice should be to take the find and replace strings in sheet named "replaces" for example and the routine will go row by row until empty row and in A column will be search strings, in B column replace strings. After null row, i would be happy if the string will start also at C (find string) and D column (replace string) etc. This last thing is about more categories for search... i like to have these separated by my logic. So after the routine will not find value in A, x or C, x or D, x etc, than script ends.
I dont know how to add example sheet, but can send you if i know where to.
I will be very happy, if the script will do the routine on SELECTION and with standard values as bellow(i just copied it bellow)
<code style="margin: 0px; padding: 0px; font-style: inherit;">LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False</code></pre>
-----------------------------
1] Also i have a question and it is if there will be some limitation. Because i have found out, that previous macro had limitations so i had to do more procedures (modules)
2] Second question - when i tryed to replace something like "ELEPHANT a" with find string "ELEPHANT A" it also replaces the previous text, where A is different than a. How can i manage, that the find and replace strings will be matching the case sensitivness.
Thank you very much!!!
till now, i am using this macro
<code style="margin: 0px; padding: 0px; font-style: inherit;"> Selection.Replace What:="SOMETHING", Replacement:="Something", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:="SOMEthing", Replacement:="Something", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:="SOMething", Replacement:="Something", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False</code></pre>
i have these replaces very, very much after a time and it is very confusing, because i dont have very good control over same words etc.
You know, the replaces needs some logic so i have made "categories" of replaces. But now i d like to move on and question you if there is some better solution, in which i will be more able to read the code and know where i have to put some new replace strings.
Here is the best way i can imagine to work with this find replace macro
I think the best choice should be to take the find and replace strings in sheet named "replaces" for example and the routine will go row by row until empty row and in A column will be search strings, in B column replace strings. After null row, i would be happy if the string will start also at C (find string) and D column (replace string) etc. This last thing is about more categories for search... i like to have these separated by my logic. So after the routine will not find value in A, x or C, x or D, x etc, than script ends.
I dont know how to add example sheet, but can send you if i know where to.
I will be very happy, if the script will do the routine on SELECTION and with standard values as bellow(i just copied it bellow)
<code style="margin: 0px; padding: 0px; font-style: inherit;">LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False</code></pre>
-----------------------------
1] Also i have a question and it is if there will be some limitation. Because i have found out, that previous macro had limitations so i had to do more procedures (modules)
2] Second question - when i tryed to replace something like "ELEPHANT a" with find string "ELEPHANT A" it also replaces the previous text, where A is different than a. How can i manage, that the find and replace strings will be matching the case sensitivness.
Thank you very much!!!