VBA find and replace












0















I am using the code below, to do a find and replace on excel:



Sub abbrev()
Dim abvtab() As Variant
Dim ltsheet As Worksheet
Dim datasheet As Worksheet
Dim lt As Range
Dim i As Long
Set ltsheet = Sheets("sheet2")
' REFERENCE TO SINGLE WORKSHEET
' Set datasheet = Sheets("ACTIVE_DIRECTORY_User")
Set lt = ltsheet.Range("A2", ltsheet.Range("B2").End(xlDown))
abvtab = lt
For Each datasheet In Worksheets
If datasheet.Name <> ltsheet.Name Then
For i = 1 To UBound(abvtab)
datasheet.Cells.Replace What:=abvtab(i, 1), Replacement:=abvtab(i, 2),
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _
ReplaceFormat:=False
Next i
End If
Next datasheet
End Sub


However it doesn't seem to be able to find parts of the words for example if I want to replace the word book the code ignores the word bookshelves



Is there a way I can set the code above to match the exact word regardless if its part of a sentence or if it has a space for example?










share|improve this question




















  • 1





    I also tried to change LookAt:=xlPart to LookAt:=xlWhole but didn't seem to make a difference

    – MH731Z
    Nov 22 '18 at 14:34











  • The replacement code works just fine when I test it. Are you sure the range that you're filling abvtab from is correct?

    – Comintern
    Nov 22 '18 at 14:49











  • Are you sure there aren't any spaces or other invisible characters in the cells you read for your find?

    – cybernetic.nomad
    Nov 22 '18 at 15:06











  • thank you for looking into it, the cells i am replacing or the ones i am referencing to all have spaces and possibly invisible characters, I am trying to get the code to isolate the words whatever they may be, when using one cell to replace it seems to work fine but when replacing multiple rows and sheets it appears to be selective and changes words from Iron Man to something like *** Man even though the search word is Iron Man

    – MH731Z
    Nov 22 '18 at 17:16
















0















I am using the code below, to do a find and replace on excel:



Sub abbrev()
Dim abvtab() As Variant
Dim ltsheet As Worksheet
Dim datasheet As Worksheet
Dim lt As Range
Dim i As Long
Set ltsheet = Sheets("sheet2")
' REFERENCE TO SINGLE WORKSHEET
' Set datasheet = Sheets("ACTIVE_DIRECTORY_User")
Set lt = ltsheet.Range("A2", ltsheet.Range("B2").End(xlDown))
abvtab = lt
For Each datasheet In Worksheets
If datasheet.Name <> ltsheet.Name Then
For i = 1 To UBound(abvtab)
datasheet.Cells.Replace What:=abvtab(i, 1), Replacement:=abvtab(i, 2),
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _
ReplaceFormat:=False
Next i
End If
Next datasheet
End Sub


However it doesn't seem to be able to find parts of the words for example if I want to replace the word book the code ignores the word bookshelves



Is there a way I can set the code above to match the exact word regardless if its part of a sentence or if it has a space for example?










share|improve this question




















  • 1





    I also tried to change LookAt:=xlPart to LookAt:=xlWhole but didn't seem to make a difference

    – MH731Z
    Nov 22 '18 at 14:34











  • The replacement code works just fine when I test it. Are you sure the range that you're filling abvtab from is correct?

    – Comintern
    Nov 22 '18 at 14:49











  • Are you sure there aren't any spaces or other invisible characters in the cells you read for your find?

    – cybernetic.nomad
    Nov 22 '18 at 15:06











  • thank you for looking into it, the cells i am replacing or the ones i am referencing to all have spaces and possibly invisible characters, I am trying to get the code to isolate the words whatever they may be, when using one cell to replace it seems to work fine but when replacing multiple rows and sheets it appears to be selective and changes words from Iron Man to something like *** Man even though the search word is Iron Man

    – MH731Z
    Nov 22 '18 at 17:16














0












0








0








I am using the code below, to do a find and replace on excel:



Sub abbrev()
Dim abvtab() As Variant
Dim ltsheet As Worksheet
Dim datasheet As Worksheet
Dim lt As Range
Dim i As Long
Set ltsheet = Sheets("sheet2")
' REFERENCE TO SINGLE WORKSHEET
' Set datasheet = Sheets("ACTIVE_DIRECTORY_User")
Set lt = ltsheet.Range("A2", ltsheet.Range("B2").End(xlDown))
abvtab = lt
For Each datasheet In Worksheets
If datasheet.Name <> ltsheet.Name Then
For i = 1 To UBound(abvtab)
datasheet.Cells.Replace What:=abvtab(i, 1), Replacement:=abvtab(i, 2),
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _
ReplaceFormat:=False
Next i
End If
Next datasheet
End Sub


However it doesn't seem to be able to find parts of the words for example if I want to replace the word book the code ignores the word bookshelves



Is there a way I can set the code above to match the exact word regardless if its part of a sentence or if it has a space for example?










share|improve this question
















I am using the code below, to do a find and replace on excel:



Sub abbrev()
Dim abvtab() As Variant
Dim ltsheet As Worksheet
Dim datasheet As Worksheet
Dim lt As Range
Dim i As Long
Set ltsheet = Sheets("sheet2")
' REFERENCE TO SINGLE WORKSHEET
' Set datasheet = Sheets("ACTIVE_DIRECTORY_User")
Set lt = ltsheet.Range("A2", ltsheet.Range("B2").End(xlDown))
abvtab = lt
For Each datasheet In Worksheets
If datasheet.Name <> ltsheet.Name Then
For i = 1 To UBound(abvtab)
datasheet.Cells.Replace What:=abvtab(i, 1), Replacement:=abvtab(i, 2),
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _
ReplaceFormat:=False
Next i
End If
Next datasheet
End Sub


However it doesn't seem to be able to find parts of the words for example if I want to replace the word book the code ignores the word bookshelves



Is there a way I can set the code above to match the exact word regardless if its part of a sentence or if it has a space for example?







excel vba excel-vba replace find






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 '18 at 16:36









Sam Harper

73




73










asked Nov 22 '18 at 14:33









MH731ZMH731Z

267




267








  • 1





    I also tried to change LookAt:=xlPart to LookAt:=xlWhole but didn't seem to make a difference

    – MH731Z
    Nov 22 '18 at 14:34











  • The replacement code works just fine when I test it. Are you sure the range that you're filling abvtab from is correct?

    – Comintern
    Nov 22 '18 at 14:49











  • Are you sure there aren't any spaces or other invisible characters in the cells you read for your find?

    – cybernetic.nomad
    Nov 22 '18 at 15:06











  • thank you for looking into it, the cells i am replacing or the ones i am referencing to all have spaces and possibly invisible characters, I am trying to get the code to isolate the words whatever they may be, when using one cell to replace it seems to work fine but when replacing multiple rows and sheets it appears to be selective and changes words from Iron Man to something like *** Man even though the search word is Iron Man

    – MH731Z
    Nov 22 '18 at 17:16














  • 1





    I also tried to change LookAt:=xlPart to LookAt:=xlWhole but didn't seem to make a difference

    – MH731Z
    Nov 22 '18 at 14:34











  • The replacement code works just fine when I test it. Are you sure the range that you're filling abvtab from is correct?

    – Comintern
    Nov 22 '18 at 14:49











  • Are you sure there aren't any spaces or other invisible characters in the cells you read for your find?

    – cybernetic.nomad
    Nov 22 '18 at 15:06











  • thank you for looking into it, the cells i am replacing or the ones i am referencing to all have spaces and possibly invisible characters, I am trying to get the code to isolate the words whatever they may be, when using one cell to replace it seems to work fine but when replacing multiple rows and sheets it appears to be selective and changes words from Iron Man to something like *** Man even though the search word is Iron Man

    – MH731Z
    Nov 22 '18 at 17:16








1




1





I also tried to change LookAt:=xlPart to LookAt:=xlWhole but didn't seem to make a difference

– MH731Z
Nov 22 '18 at 14:34





I also tried to change LookAt:=xlPart to LookAt:=xlWhole but didn't seem to make a difference

– MH731Z
Nov 22 '18 at 14:34













The replacement code works just fine when I test it. Are you sure the range that you're filling abvtab from is correct?

– Comintern
Nov 22 '18 at 14:49





The replacement code works just fine when I test it. Are you sure the range that you're filling abvtab from is correct?

– Comintern
Nov 22 '18 at 14:49













Are you sure there aren't any spaces or other invisible characters in the cells you read for your find?

– cybernetic.nomad
Nov 22 '18 at 15:06





Are you sure there aren't any spaces or other invisible characters in the cells you read for your find?

– cybernetic.nomad
Nov 22 '18 at 15:06













thank you for looking into it, the cells i am replacing or the ones i am referencing to all have spaces and possibly invisible characters, I am trying to get the code to isolate the words whatever they may be, when using one cell to replace it seems to work fine but when replacing multiple rows and sheets it appears to be selective and changes words from Iron Man to something like *** Man even though the search word is Iron Man

– MH731Z
Nov 22 '18 at 17:16





thank you for looking into it, the cells i am replacing or the ones i am referencing to all have spaces and possibly invisible characters, I am trying to get the code to isolate the words whatever they may be, when using one cell to replace it seems to work fine but when replacing multiple rows and sheets it appears to be selective and changes words from Iron Man to something like *** Man even though the search word is Iron Man

– MH731Z
Nov 22 '18 at 17:16












2 Answers
2






active

oldest

votes


















1














in the end I had to abandon vba and instead I used C# Regex.Replace there was many issues with the find and replace via excel so the solution below seemed to work well, although the below worked i also had to abandon it as csv was the wrong file format for what i needed I'll be using mysql instead, i pasted the code below either way just in case someone might benefit from it and use it to do find and replace at scale



using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Text.RegularExpressions;


namespace ConsoleApp10
{
class Program
{
static void Main(string args)
{
string SAR_CONTACTS = @"C: UsersDesktopSAR_CONTACTS.csv";
string SAR_CONTENT = @"C: UsersDesktopSAR_CONTENT.csv";
string READ_SAR_CONTACTS;
using (StreamReader streamReader = new StreamReader(SAR_CONTENT, Encoding.UTF8))
READ_SAR_CONTACTS = streamReader.ReadToEnd();

string SAR_CONTACTS_FILE = File.ReadAllText(SAR_CONTACTS);
string SAR_CONTENT_FILE = SAR_CONTACTS_FILE.Replace("rn", "|");
SAR_CONTENT_FILE = SAR_CONTENT_FILE.Remove(SAR_CONTENT_FILE.Length - 1);
string SAR_CONTENT_CENSORED = Regex.Replace(READ_SAR_CONTACTS, SAR_CONTENT_FILE,
"######", RegexOptions.IgnoreCase);
File.WriteAllText(@"C: UsersDesktopSAR_CONTENT_FILTERED.csv",
SAR_CONTENT_CENSORED);
}
}
}





share|improve this answer































    0














    How about this?



    Sub Multi_FindReplace()

    Dim sht As Worksheet
    Dim fndList As Variant
    Dim rplcList As Variant
    Dim x As Long

    fndList = Array("*" & "Ca" & "*", "United States", "Mexico")
    rplcList = Array("CAN", "USA", "MEX")

    'Loop through each item in Array lists
    For x = LBound(fndList) To UBound(fndList)
    'Loop through each worksheet in ActiveWorkbook
    For Each sht In ActiveWorkbook.Worksheets
    sht.Cells.Replace What:=fndList(x), Replacement:=rplcList(x), _
    LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
    SearchFormat:=False, ReplaceFormat:=False
    Next sht

    Next x

    End Sub


    Notice the wildcard characters: "*" & "Ca" & "*"



    Before:



    enter image description here



    After:



    enter image description here






    share|improve this answer























      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53433185%2fvba-find-and-replace%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      in the end I had to abandon vba and instead I used C# Regex.Replace there was many issues with the find and replace via excel so the solution below seemed to work well, although the below worked i also had to abandon it as csv was the wrong file format for what i needed I'll be using mysql instead, i pasted the code below either way just in case someone might benefit from it and use it to do find and replace at scale



      using System;
      using System.Collections.Generic;
      using System.Linq;
      using System.Text;
      using System.Threading.Tasks;
      using System.IO;
      using System.Text.RegularExpressions;


      namespace ConsoleApp10
      {
      class Program
      {
      static void Main(string args)
      {
      string SAR_CONTACTS = @"C: UsersDesktopSAR_CONTACTS.csv";
      string SAR_CONTENT = @"C: UsersDesktopSAR_CONTENT.csv";
      string READ_SAR_CONTACTS;
      using (StreamReader streamReader = new StreamReader(SAR_CONTENT, Encoding.UTF8))
      READ_SAR_CONTACTS = streamReader.ReadToEnd();

      string SAR_CONTACTS_FILE = File.ReadAllText(SAR_CONTACTS);
      string SAR_CONTENT_FILE = SAR_CONTACTS_FILE.Replace("rn", "|");
      SAR_CONTENT_FILE = SAR_CONTENT_FILE.Remove(SAR_CONTENT_FILE.Length - 1);
      string SAR_CONTENT_CENSORED = Regex.Replace(READ_SAR_CONTACTS, SAR_CONTENT_FILE,
      "######", RegexOptions.IgnoreCase);
      File.WriteAllText(@"C: UsersDesktopSAR_CONTENT_FILTERED.csv",
      SAR_CONTENT_CENSORED);
      }
      }
      }





      share|improve this answer




























        1














        in the end I had to abandon vba and instead I used C# Regex.Replace there was many issues with the find and replace via excel so the solution below seemed to work well, although the below worked i also had to abandon it as csv was the wrong file format for what i needed I'll be using mysql instead, i pasted the code below either way just in case someone might benefit from it and use it to do find and replace at scale



        using System;
        using System.Collections.Generic;
        using System.Linq;
        using System.Text;
        using System.Threading.Tasks;
        using System.IO;
        using System.Text.RegularExpressions;


        namespace ConsoleApp10
        {
        class Program
        {
        static void Main(string args)
        {
        string SAR_CONTACTS = @"C: UsersDesktopSAR_CONTACTS.csv";
        string SAR_CONTENT = @"C: UsersDesktopSAR_CONTENT.csv";
        string READ_SAR_CONTACTS;
        using (StreamReader streamReader = new StreamReader(SAR_CONTENT, Encoding.UTF8))
        READ_SAR_CONTACTS = streamReader.ReadToEnd();

        string SAR_CONTACTS_FILE = File.ReadAllText(SAR_CONTACTS);
        string SAR_CONTENT_FILE = SAR_CONTACTS_FILE.Replace("rn", "|");
        SAR_CONTENT_FILE = SAR_CONTENT_FILE.Remove(SAR_CONTENT_FILE.Length - 1);
        string SAR_CONTENT_CENSORED = Regex.Replace(READ_SAR_CONTACTS, SAR_CONTENT_FILE,
        "######", RegexOptions.IgnoreCase);
        File.WriteAllText(@"C: UsersDesktopSAR_CONTENT_FILTERED.csv",
        SAR_CONTENT_CENSORED);
        }
        }
        }





        share|improve this answer


























          1












          1








          1







          in the end I had to abandon vba and instead I used C# Regex.Replace there was many issues with the find and replace via excel so the solution below seemed to work well, although the below worked i also had to abandon it as csv was the wrong file format for what i needed I'll be using mysql instead, i pasted the code below either way just in case someone might benefit from it and use it to do find and replace at scale



          using System;
          using System.Collections.Generic;
          using System.Linq;
          using System.Text;
          using System.Threading.Tasks;
          using System.IO;
          using System.Text.RegularExpressions;


          namespace ConsoleApp10
          {
          class Program
          {
          static void Main(string args)
          {
          string SAR_CONTACTS = @"C: UsersDesktopSAR_CONTACTS.csv";
          string SAR_CONTENT = @"C: UsersDesktopSAR_CONTENT.csv";
          string READ_SAR_CONTACTS;
          using (StreamReader streamReader = new StreamReader(SAR_CONTENT, Encoding.UTF8))
          READ_SAR_CONTACTS = streamReader.ReadToEnd();

          string SAR_CONTACTS_FILE = File.ReadAllText(SAR_CONTACTS);
          string SAR_CONTENT_FILE = SAR_CONTACTS_FILE.Replace("rn", "|");
          SAR_CONTENT_FILE = SAR_CONTENT_FILE.Remove(SAR_CONTENT_FILE.Length - 1);
          string SAR_CONTENT_CENSORED = Regex.Replace(READ_SAR_CONTACTS, SAR_CONTENT_FILE,
          "######", RegexOptions.IgnoreCase);
          File.WriteAllText(@"C: UsersDesktopSAR_CONTENT_FILTERED.csv",
          SAR_CONTENT_CENSORED);
          }
          }
          }





          share|improve this answer













          in the end I had to abandon vba and instead I used C# Regex.Replace there was many issues with the find and replace via excel so the solution below seemed to work well, although the below worked i also had to abandon it as csv was the wrong file format for what i needed I'll be using mysql instead, i pasted the code below either way just in case someone might benefit from it and use it to do find and replace at scale



          using System;
          using System.Collections.Generic;
          using System.Linq;
          using System.Text;
          using System.Threading.Tasks;
          using System.IO;
          using System.Text.RegularExpressions;


          namespace ConsoleApp10
          {
          class Program
          {
          static void Main(string args)
          {
          string SAR_CONTACTS = @"C: UsersDesktopSAR_CONTACTS.csv";
          string SAR_CONTENT = @"C: UsersDesktopSAR_CONTENT.csv";
          string READ_SAR_CONTACTS;
          using (StreamReader streamReader = new StreamReader(SAR_CONTENT, Encoding.UTF8))
          READ_SAR_CONTACTS = streamReader.ReadToEnd();

          string SAR_CONTACTS_FILE = File.ReadAllText(SAR_CONTACTS);
          string SAR_CONTENT_FILE = SAR_CONTACTS_FILE.Replace("rn", "|");
          SAR_CONTENT_FILE = SAR_CONTENT_FILE.Remove(SAR_CONTENT_FILE.Length - 1);
          string SAR_CONTENT_CENSORED = Regex.Replace(READ_SAR_CONTACTS, SAR_CONTENT_FILE,
          "######", RegexOptions.IgnoreCase);
          File.WriteAllText(@"C: UsersDesktopSAR_CONTENT_FILTERED.csv",
          SAR_CONTENT_CENSORED);
          }
          }
          }






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 2 '18 at 20:03









          MH731ZMH731Z

          267




          267

























              0














              How about this?



              Sub Multi_FindReplace()

              Dim sht As Worksheet
              Dim fndList As Variant
              Dim rplcList As Variant
              Dim x As Long

              fndList = Array("*" & "Ca" & "*", "United States", "Mexico")
              rplcList = Array("CAN", "USA", "MEX")

              'Loop through each item in Array lists
              For x = LBound(fndList) To UBound(fndList)
              'Loop through each worksheet in ActiveWorkbook
              For Each sht In ActiveWorkbook.Worksheets
              sht.Cells.Replace What:=fndList(x), Replacement:=rplcList(x), _
              LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
              SearchFormat:=False, ReplaceFormat:=False
              Next sht

              Next x

              End Sub


              Notice the wildcard characters: "*" & "Ca" & "*"



              Before:



              enter image description here



              After:



              enter image description here






              share|improve this answer




























                0














                How about this?



                Sub Multi_FindReplace()

                Dim sht As Worksheet
                Dim fndList As Variant
                Dim rplcList As Variant
                Dim x As Long

                fndList = Array("*" & "Ca" & "*", "United States", "Mexico")
                rplcList = Array("CAN", "USA", "MEX")

                'Loop through each item in Array lists
                For x = LBound(fndList) To UBound(fndList)
                'Loop through each worksheet in ActiveWorkbook
                For Each sht In ActiveWorkbook.Worksheets
                sht.Cells.Replace What:=fndList(x), Replacement:=rplcList(x), _
                LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
                SearchFormat:=False, ReplaceFormat:=False
                Next sht

                Next x

                End Sub


                Notice the wildcard characters: "*" & "Ca" & "*"



                Before:



                enter image description here



                After:



                enter image description here






                share|improve this answer


























                  0












                  0








                  0







                  How about this?



                  Sub Multi_FindReplace()

                  Dim sht As Worksheet
                  Dim fndList As Variant
                  Dim rplcList As Variant
                  Dim x As Long

                  fndList = Array("*" & "Ca" & "*", "United States", "Mexico")
                  rplcList = Array("CAN", "USA", "MEX")

                  'Loop through each item in Array lists
                  For x = LBound(fndList) To UBound(fndList)
                  'Loop through each worksheet in ActiveWorkbook
                  For Each sht In ActiveWorkbook.Worksheets
                  sht.Cells.Replace What:=fndList(x), Replacement:=rplcList(x), _
                  LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
                  SearchFormat:=False, ReplaceFormat:=False
                  Next sht

                  Next x

                  End Sub


                  Notice the wildcard characters: "*" & "Ca" & "*"



                  Before:



                  enter image description here



                  After:



                  enter image description here






                  share|improve this answer













                  How about this?



                  Sub Multi_FindReplace()

                  Dim sht As Worksheet
                  Dim fndList As Variant
                  Dim rplcList As Variant
                  Dim x As Long

                  fndList = Array("*" & "Ca" & "*", "United States", "Mexico")
                  rplcList = Array("CAN", "USA", "MEX")

                  'Loop through each item in Array lists
                  For x = LBound(fndList) To UBound(fndList)
                  'Loop through each worksheet in ActiveWorkbook
                  For Each sht In ActiveWorkbook.Worksheets
                  sht.Cells.Replace What:=fndList(x), Replacement:=rplcList(x), _
                  LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
                  SearchFormat:=False, ReplaceFormat:=False
                  Next sht

                  Next x

                  End Sub


                  Notice the wildcard characters: "*" & "Ca" & "*"



                  Before:



                  enter image description here



                  After:



                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 24 '18 at 17:22









                  ryguy72ryguy72

                  4,1171819




                  4,1171819






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53433185%2fvba-find-and-replace%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      404 Error Contact Form 7 ajax form submitting

                      How to know if a Active Directory user can login interactively

                      Refactoring coordinates for Minecraft Pi buildings written in Python