![keys for find and replace keys for find and replace](http://i1.ytimg.com/vi/bashlEcaIw0/maxresdefault.jpg)
![keys for find and replace keys for find and replace](http://hopdeasset.weebly.com/uploads/1/3/3/6/133620375/746749818_orig.jpg)
Step 3: Now choose the exact word which we want to replace. Step 2: Select the list as Range from B2 to B10. Step 1: Start the subcategory of VBA Find and Replace there as shown below. As we can see, we have purposely added a word BEN in upper case in cell B2.įollow the below steps to find and replace the word BEN. This process cannot be done with the help of find and replace function (Ctrl + H) of excel. And if we are using the process which we have seen in example-1 then we would end up replacing all the similar words in that list along with required one. Suppose in a list, if we want to replace only that word which has some lower case or upper case letters. We all might have faced a situation where we tried to find and replace some words with case sensitive letters. And that is highlighted in yellow color as well. We will see, all the cells containing the name as Ben is now replaced with name Sam.
#Keys for find and replace code#
Step 7: Now compile the code and run it by clicking on the Play button or by pressing the F5 key, as shown below.
![keys for find and replace keys for find and replace](https://i5.walmartimages.com/asr/01fba49e-5ab2-41a4-851c-5dd205640b4d_1.0156f7fb3e5274945c02958a7304563d.jpeg)
Here we chose to replace name Ben with Sam which is mentioned as Replacement as shown below. Step 6: Now choose the replacement word by which we need to replace the selected word. Step 5: Let’s select the first name of the list “ Ben” as what we need to replace. Here also we will first select the Replace function to look at what we need to replace.Īs per the syntax of the Replace function, we will find what we need to replace. Step 4: Now to replace something we need to look for that word. Step 3: As we have the data in column B from cell B2 to B10, so we will select that Range first from B2:B10.