Find and replace in Excel
Closed
NehruKhandrika
-
Updated on Nov 14, 2018 at 11:08 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Nov 15, 2018 at 12:04 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Nov 15, 2018 at 12:04 PM
Related:
- Find and replace in Excel
- Number to words in excel - Guide
- Marksheet in excel - Guide
- How to take screenshot in excel - Guide
- Excel free download - Download - Spreadsheets
- Gif in excel - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
552
Nov 15, 2018 at 12:04 PM
Nov 15, 2018 at 12:04 PM
Hi Nehru,
Give the following code a try:
NOTE: The word "red" is also part of the word "predominantly". To prevent the "e" to be removed from the word "predominantly", place a space in front of the word "red" on sheet1. So "Red" becomes " Red". Keep this in mind with other short words you might have in your list.
Best regards,
Trowa
Give the following code a try:
Sub RunMe() For Each cell In Sheets("Sheet1").Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row) Sheets("Sheet2").Columns(1).Replace What:=cell.Value, Replacement:=cell.Offset(0, 1).Value, LookAt:=xlPart Next cell End Sub
NOTE: The word "red" is also part of the word "predominantly". To prevent the "e" to be removed from the word "predominantly", place a space in front of the word "red" on sheet1. So "Red" becomes " Red". Keep this in mind with other short words you might have in your list.
Best regards,
Trowa