Replacing with the Replace Method : Replace « Forms « VBA / Excel / Access / Word






Replacing with the Replace Method

 
Sub replace()
    ActiveSheet.Columns("B").Replace What:="Sales", _
        Replacement:="Sales & Marketing", SearchOrder:=xlByColumns, _
        MatchCase:=True
End Sub

 








Related examples in the same category

1.Replace information in all sheets of the workbook
2.Using Replace to Replace Formatting