Replacing a value in a cell with another
问题 I am writing a macro in Excel spreadsheets to replace a value in one cell by the content of another cell and loop through the original text replacing the same value, whenever it sees this word. For example, I have a text in a range of cells, where every line has a word "tagname" I want to replace "tagname" with the value of cell A1 of the same spreadsheet, for example to say "Maggie" instead of tagname. This is my code thus far: Private Sub CommandButton21_Click() Dim OriginalText As Range